replicant-mcp 1.4.5 → 1.4.6

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.
@@ -118,7 +118,7 @@ export class UiAutomatorAdapter {
118
118
  }
119
119
  async screenshot(deviceId, options = {}) {
120
120
  const remotePath = "/sdcard/replicant-screenshot.png";
121
- const maxDimension = options.maxDimension ?? 1000;
121
+ const maxDimension = options.maxDimension ?? 800;
122
122
  // Capture screenshot on device
123
123
  const captureResult = await this.adb.shell(deviceId, `screencap -p ${remotePath}`);
124
124
  if (captureResult.exitCode !== 0) {
@@ -139,10 +139,12 @@ export class UiAutomatorAdapter {
139
139
  const scaleFactor = calculateScaleFactor(deviceWidth, deviceHeight, maxDimension);
140
140
  const imageWidth = Math.round(deviceWidth / scaleFactor);
141
141
  const imageHeight = Math.round(deviceHeight / scaleFactor);
142
- // Scale and convert to JPEG
142
+ // Sharpen, scale, convert to WebP, strip ICC profile
143
143
  const buffer = await sharp(tempPath)
144
+ .sharpen({ sigma: 0.5 })
144
145
  .resize(imageWidth, imageHeight)
145
- .jpeg({ quality: 70 })
146
+ .webp({ quality: 72, effort: 5, smartSubsample: true })
147
+ .withMetadata({})
146
148
  .toBuffer();
147
149
  // Update scaling state (now supported for inline!)
148
150
  this.scalingState = {
@@ -155,7 +157,7 @@ export class UiAutomatorAdapter {
155
157
  return {
156
158
  mode: "inline",
157
159
  base64: buffer.toString("base64"),
158
- mimeType: "image/jpeg",
160
+ mimeType: "image/webp",
159
161
  sizeBytes: buffer.length,
160
162
  device: { width: deviceWidth, height: deviceHeight },
161
163
  image: { width: imageWidth, height: imageHeight },
package/dist/tools/ui.js CHANGED
@@ -102,7 +102,7 @@ export async function handleUiTool(input, context, uiConfig) {
102
102
  visualModePackages: [],
103
103
  autoFallbackScreenshot: true,
104
104
  includeBase64: false,
105
- maxImageDimension: 1000,
105
+ maxImageDimension: 800,
106
106
  };
107
107
  switch (input.operation) {
108
108
  case "dump": {
@@ -9,7 +9,7 @@ export interface UiConfig {
9
9
  autoFallbackScreenshot: boolean;
10
10
  /** Include base64-encoded screenshot in response (default: false) */
11
11
  includeBase64: boolean;
12
- /** Maximum dimension (width or height) for screenshots in pixels (default: 1000) */
12
+ /** Maximum dimension (width or height) for screenshots in pixels (default: 800) */
13
13
  maxImageDimension: number;
14
14
  }
15
15
  export interface ReplicantConfig {
@@ -7,6 +7,6 @@ export const DEFAULT_CONFIG = {
7
7
  visualModePackages: [],
8
8
  autoFallbackScreenshot: true,
9
9
  includeBase64: false,
10
- maxImageDimension: 1000,
10
+ maxImageDimension: 800,
11
11
  },
12
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicant-mcp",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "Android MCP server for AI-assisted Android development",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",