@midscene/mcp 1.2.1-beta-20260113073450.0 → 1.2.1-beta-20260114072539.0

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/dist/index.js CHANGED
@@ -21580,7 +21580,7 @@ var __webpack_modules__ = {
21580
21580
  const external_node_fs_namespaceObject = require("node:fs");
21581
21581
  const external_node_path_namespaceObject = require("node:path");
21582
21582
  var external_node_util_ = __webpack_require__("node:util");
21583
- var src = __webpack_require__("../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js");
21583
+ var debug_src = __webpack_require__("../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js");
21584
21584
  const external_node_os_namespaceObject = require("node:os");
21585
21585
  const MIDSCENE_MODEL_INIT_CONFIG_JSON = 'MIDSCENE_MODEL_INIT_CONFIG_JSON';
21586
21586
  const MIDSCENE_MODEL_NAME = 'MIDSCENE_MODEL_NAME';
@@ -21737,7 +21737,9 @@ var __webpack_modules__ = {
21737
21737
  'qwen3-vl',
21738
21738
  'vlm-ui-tars',
21739
21739
  'vlm-ui-tars-doubao',
21740
- 'vlm-ui-tars-doubao-1.5'
21740
+ 'vlm-ui-tars-doubao-1.5',
21741
+ 'auto-glm',
21742
+ 'auto-glm-multilingual'
21741
21743
  ];
21742
21744
  [
21743
21745
  ...VL_MODE_RAW_VALID_VALUES
@@ -21808,7 +21810,7 @@ var __webpack_modules__ = {
21808
21810
  function logger_getDebug(topic) {
21809
21811
  const fullTopic = `${topicPrefix}:${topic}`;
21810
21812
  if (!debugInstances.has(fullTopic)) {
21811
- const debugFn = src(fullTopic);
21813
+ const debugFn = debug_src(fullTopic);
21812
21814
  const wrapper = (...args)=>{
21813
21815
  if (utils.$9) {
21814
21816
  const message = external_node_util_.format(...args);
@@ -21869,11 +21871,42 @@ var __webpack_modules__ = {
21869
21871
  rect: RectSchema
21870
21872
  }).passthrough();
21871
21873
  const getMidsceneLocationSchema = ()=>MidsceneLocationInput;
21874
+ logger_getDebug('auto-glm-parser');
21872
21875
  logger_getDebug('ai:inspect');
21873
21876
  logger_getDebug('ai:section');
21874
21877
  logger_getDebug('planning');
21878
+ function _define_property(obj, key, value) {
21879
+ if (key in obj) Object.defineProperty(obj, key, {
21880
+ value: value,
21881
+ enumerable: true,
21882
+ configurable: true,
21883
+ writable: true
21884
+ });
21885
+ else obj[key] = value;
21886
+ return obj;
21887
+ }
21888
+ class LatestLocateRecorder {
21889
+ recordLocate(locate, source) {
21890
+ this.latestLocate = locate;
21891
+ this.source = source;
21892
+ }
21893
+ getLatestLocate() {
21894
+ return {
21895
+ locate: this.latestLocate,
21896
+ source: this.source
21897
+ };
21898
+ }
21899
+ constructor(){
21900
+ _define_property(this, "latestLocate", void 0);
21901
+ _define_property(this, "source", '');
21902
+ }
21903
+ }
21904
+ logger_getDebug('auto-glm-actions');
21905
+ new LatestLocateRecorder();
21906
+ logger_getDebug('auto-glm-planning');
21875
21907
  __webpack_require__("../../node_modules/.pnpm/lodash.isnumber@3.0.3/node_modules/lodash.isnumber/index.js");
21876
21908
  logger_getDebug('ui-tars-planning');
21909
+ new LatestLocateRecorder();
21877
21910
  var _computedKey;
21878
21911
  _computedKey = Symbol.iterator;
21879
21912
  logger_getDebug('ai:service');
@@ -24035,12 +24068,6 @@ var __webpack_modules__ = {
24035
24068
  thought: lib.z.string().describe('The thought of the assertion, like "I can see there are A, B, C elements on the page, which means ... , so the assertion is true"'),
24036
24069
  result: lib.z.boolean().describe('The result of the assertion, true or false')
24037
24070
  });
24038
- lib.z.object({
24039
- millisecond: lib.z.number().default(1000).optional().describe('Sleep duration in milliseconds, defaults to 1000ms (1 second)')
24040
- });
24041
- lib.z.object({
24042
- message: lib.z.string().optional().describe('The conclusion, data, or return value that the user needs. This message will be provided to the user when the task is finalized.')
24043
- });
24044
24071
  require("node:assert");
24045
24072
  __webpack_require__("../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/index.js");
24046
24073
  __webpack_require__("../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js");
@@ -24094,7 +24121,7 @@ var __webpack_modules__ = {
24094
24121
  }
24095
24122
  return false;
24096
24123
  }
24097
- function getZodTypeName(field, locatorTypeDescription) {
24124
+ function zod_schema_utils_getZodTypeName(field, locatorTypeDescription) {
24098
24125
  const actualField = unwrapZodField(field);
24099
24126
  const fieldTypeName = actualField._def?.typeName;
24100
24127
  if ('ZodString' === fieldTypeName) return 'string';
@@ -24112,14 +24139,14 @@ var __webpack_modules__ = {
24112
24139
  if ('ZodUnion' === fieldTypeName) {
24113
24140
  const options = actualField._def?.options;
24114
24141
  if (options && options.length > 0) {
24115
- const types = options.map((opt)=>getZodTypeName(opt, locatorTypeDescription));
24142
+ const types = options.map((opt)=>zod_schema_utils_getZodTypeName(opt, locatorTypeDescription));
24116
24143
  return types.join(' | ');
24117
24144
  }
24118
24145
  return 'union';
24119
24146
  }
24120
24147
  return 'unknown';
24121
24148
  }
24122
- function getZodDescription(field) {
24149
+ function zod_schema_utils_getZodDescription(field) {
24123
24150
  if ("description" in field) return field.description || null;
24124
24151
  const actualField = unwrapZodField(field);
24125
24152
  if ("description" in actualField) return actualField.description || null;
@@ -24135,16 +24162,16 @@ var __webpack_modules__ = {
24135
24162
  const schema = action.paramSchema;
24136
24163
  const isZodObjectType = schema._def?.typeName === 'ZodObject';
24137
24164
  if (!isZodObjectType || !schema.shape) {
24138
- const typeName = getZodTypeName(schema);
24139
- const description = getZodDescription(schema);
24165
+ const typeName = zod_schema_utils_getZodTypeName(schema);
24166
+ const description = zod_schema_utils_getZodDescription(schema);
24140
24167
  const paramDesc = description ? `${typeName} - ${description}` : typeName;
24141
24168
  return `${action.name} action, ${actionDesc}. Parameter: ${paramDesc}`;
24142
24169
  }
24143
24170
  const paramDescriptions = [];
24144
24171
  for (const [key, field] of Object.entries(schema.shape))if (field && 'object' == typeof field) {
24145
24172
  const isFieldOptional = 'function' == typeof field.isOptional && field.isOptional();
24146
- const typeName = getZodTypeName(field);
24147
- const description = getZodDescription(field);
24173
+ const typeName = zod_schema_utils_getZodTypeName(field);
24174
+ const description = zod_schema_utils_getZodDescription(field);
24148
24175
  let paramStr = `${key}${isFieldOptional ? '?' : ''} (${typeName})`;
24149
24176
  if (description) paramStr += ` - ${description}`;
24150
24177
  paramDescriptions.push(paramStr);
@@ -24155,7 +24182,7 @@ var __webpack_modules__ = {
24155
24182
  function isZodOptional(value) {
24156
24183
  return '_def' in value && value._def?.typeName === 'ZodOptional';
24157
24184
  }
24158
- function isZodObject(value) {
24185
+ function tool_generator_isZodObject(value) {
24159
24186
  return '_def' in value && value._def?.typeName === 'ZodObject' && 'shape' in value;
24160
24187
  }
24161
24188
  function unwrapOptional(value) {
@@ -24169,7 +24196,7 @@ var __webpack_modules__ = {
24169
24196
  };
24170
24197
  }
24171
24198
  function isLocateField(value) {
24172
- if (!isZodObject(value)) return false;
24199
+ if (!tool_generator_isZodObject(value)) return false;
24173
24200
  return 'prompt' in value.shape;
24174
24201
  }
24175
24202
  function makePromptOptional(value, wrapInOptional) {
@@ -24183,7 +24210,7 @@ var __webpack_modules__ = {
24183
24210
  }
24184
24211
  function transformSchemaField(key, value) {
24185
24212
  const { innerValue, isOptional } = unwrapOptional(value);
24186
- if (isZodObject(innerValue) && isLocateField(innerValue)) return [
24213
+ if (tool_generator_isZodObject(innerValue) && isLocateField(innerValue)) return [
24187
24214
  key,
24188
24215
  makePromptOptional(innerValue, isOptional)
24189
24216
  ];
@@ -24195,7 +24222,7 @@ var __webpack_modules__ = {
24195
24222
  function extractActionSchema(paramSchema) {
24196
24223
  if (!paramSchema) return {};
24197
24224
  const schema = paramSchema;
24198
- if (!isZodObject(schema)) return schema;
24225
+ if (!tool_generator_isZodObject(schema)) return schema;
24199
24226
  return Object.fromEntries(Object.entries(schema.shape).map(([key, value])=>transformSchemaField(key, value)));
24200
24227
  }
24201
24228
  function serializeArgsToDescription(args) {
@@ -24582,7 +24609,7 @@ For more information, visit: https://midscenejs.com/mcp-migration
24582
24609
  constructor(){
24583
24610
  super({
24584
24611
  name: '@midscene/mcp',
24585
- version: '1.2.1-beta-20260113073450.0',
24612
+ version: '1.2.1-beta-20260114072539.0',
24586
24613
  description: 'Deprecated - Use @midscene/web-bridge-mcp, @midscene/android-mcp, or @midscene/ios-mcp'
24587
24614
  });
24588
24615
  }
package/dist/server.js CHANGED
@@ -28780,7 +28780,7 @@ var __webpack_exports__ = {};
28780
28780
  const external_node_fs_namespaceObject = require("node:fs");
28781
28781
  const external_node_path_namespaceObject = require("node:path");
28782
28782
  var external_node_util_ = __webpack_require__("node:util");
28783
- var src = __webpack_require__("../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js");
28783
+ var debug_src = __webpack_require__("../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js");
28784
28784
  const external_node_os_namespaceObject = require("node:os");
28785
28785
  const MIDSCENE_MODEL_INIT_CONFIG_JSON = 'MIDSCENE_MODEL_INIT_CONFIG_JSON';
28786
28786
  const MIDSCENE_MODEL_NAME = 'MIDSCENE_MODEL_NAME';
@@ -28937,7 +28937,9 @@ var __webpack_exports__ = {};
28937
28937
  'qwen3-vl',
28938
28938
  'vlm-ui-tars',
28939
28939
  'vlm-ui-tars-doubao',
28940
- 'vlm-ui-tars-doubao-1.5'
28940
+ 'vlm-ui-tars-doubao-1.5',
28941
+ 'auto-glm',
28942
+ 'auto-glm-multilingual'
28941
28943
  ];
28942
28944
  [
28943
28945
  ...VL_MODE_RAW_VALID_VALUES
@@ -29008,7 +29010,7 @@ var __webpack_exports__ = {};
29008
29010
  function logger_getDebug(topic) {
29009
29011
  const fullTopic = `${topicPrefix}:${topic}`;
29010
29012
  if (!debugInstances.has(fullTopic)) {
29011
- const debugFn = src(fullTopic);
29013
+ const debugFn = debug_src(fullTopic);
29012
29014
  const wrapper = (...args)=>{
29013
29015
  if (utils.$9) {
29014
29016
  const message = external_node_util_.format(...args);
@@ -29069,11 +29071,42 @@ var __webpack_exports__ = {};
29069
29071
  rect: RectSchema
29070
29072
  }).passthrough();
29071
29073
  const getMidsceneLocationSchema = ()=>MidsceneLocationInput;
29074
+ logger_getDebug('auto-glm-parser');
29072
29075
  logger_getDebug('ai:inspect');
29073
29076
  logger_getDebug('ai:section');
29074
29077
  logger_getDebug('planning');
29078
+ function _define_property(obj, key, value) {
29079
+ if (key in obj) Object.defineProperty(obj, key, {
29080
+ value: value,
29081
+ enumerable: true,
29082
+ configurable: true,
29083
+ writable: true
29084
+ });
29085
+ else obj[key] = value;
29086
+ return obj;
29087
+ }
29088
+ class LatestLocateRecorder {
29089
+ recordLocate(locate, source) {
29090
+ this.latestLocate = locate;
29091
+ this.source = source;
29092
+ }
29093
+ getLatestLocate() {
29094
+ return {
29095
+ locate: this.latestLocate,
29096
+ source: this.source
29097
+ };
29098
+ }
29099
+ constructor(){
29100
+ _define_property(this, "latestLocate", void 0);
29101
+ _define_property(this, "source", '');
29102
+ }
29103
+ }
29104
+ logger_getDebug('auto-glm-actions');
29105
+ new LatestLocateRecorder();
29106
+ logger_getDebug('auto-glm-planning');
29075
29107
  __webpack_require__("../../node_modules/.pnpm/lodash.isnumber@3.0.3/node_modules/lodash.isnumber/index.js");
29076
29108
  logger_getDebug('ui-tars-planning');
29109
+ new LatestLocateRecorder();
29077
29110
  var _computedKey;
29078
29111
  _computedKey = Symbol.iterator;
29079
29112
  logger_getDebug('ai:service');
@@ -31235,12 +31268,6 @@ var __webpack_exports__ = {};
31235
31268
  thought: lib.z.string().describe('The thought of the assertion, like "I can see there are A, B, C elements on the page, which means ... , so the assertion is true"'),
31236
31269
  result: lib.z.boolean().describe('The result of the assertion, true or false')
31237
31270
  });
31238
- lib.z.object({
31239
- millisecond: lib.z.number().default(1000).optional().describe('Sleep duration in milliseconds, defaults to 1000ms (1 second)')
31240
- });
31241
- lib.z.object({
31242
- message: lib.z.string().optional().describe('The conclusion, data, or return value that the user needs. This message will be provided to the user when the task is finalized.')
31243
- });
31244
31271
  require("node:assert");
31245
31272
  __webpack_require__("../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/index.js");
31246
31273
  __webpack_require__("../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js");
@@ -31294,7 +31321,7 @@ var __webpack_exports__ = {};
31294
31321
  }
31295
31322
  return false;
31296
31323
  }
31297
- function getZodTypeName(field, locatorTypeDescription) {
31324
+ function zod_schema_utils_getZodTypeName(field, locatorTypeDescription) {
31298
31325
  const actualField = unwrapZodField(field);
31299
31326
  const fieldTypeName = actualField._def?.typeName;
31300
31327
  if ('ZodString' === fieldTypeName) return 'string';
@@ -31312,14 +31339,14 @@ var __webpack_exports__ = {};
31312
31339
  if ('ZodUnion' === fieldTypeName) {
31313
31340
  const options = actualField._def?.options;
31314
31341
  if (options && options.length > 0) {
31315
- const types = options.map((opt)=>getZodTypeName(opt, locatorTypeDescription));
31342
+ const types = options.map((opt)=>zod_schema_utils_getZodTypeName(opt, locatorTypeDescription));
31316
31343
  return types.join(' | ');
31317
31344
  }
31318
31345
  return 'union';
31319
31346
  }
31320
31347
  return 'unknown';
31321
31348
  }
31322
- function getZodDescription(field) {
31349
+ function zod_schema_utils_getZodDescription(field) {
31323
31350
  if ("description" in field) return field.description || null;
31324
31351
  const actualField = unwrapZodField(field);
31325
31352
  if ("description" in actualField) return actualField.description || null;
@@ -31335,16 +31362,16 @@ var __webpack_exports__ = {};
31335
31362
  const schema = action.paramSchema;
31336
31363
  const isZodObjectType = schema._def?.typeName === 'ZodObject';
31337
31364
  if (!isZodObjectType || !schema.shape) {
31338
- const typeName = getZodTypeName(schema);
31339
- const description = getZodDescription(schema);
31365
+ const typeName = zod_schema_utils_getZodTypeName(schema);
31366
+ const description = zod_schema_utils_getZodDescription(schema);
31340
31367
  const paramDesc = description ? `${typeName} - ${description}` : typeName;
31341
31368
  return `${action.name} action, ${actionDesc}. Parameter: ${paramDesc}`;
31342
31369
  }
31343
31370
  const paramDescriptions = [];
31344
31371
  for (const [key, field] of Object.entries(schema.shape))if (field && 'object' == typeof field) {
31345
31372
  const isFieldOptional = 'function' == typeof field.isOptional && field.isOptional();
31346
- const typeName = getZodTypeName(field);
31347
- const description = getZodDescription(field);
31373
+ const typeName = zod_schema_utils_getZodTypeName(field);
31374
+ const description = zod_schema_utils_getZodDescription(field);
31348
31375
  let paramStr = `${key}${isFieldOptional ? '?' : ''} (${typeName})`;
31349
31376
  if (description) paramStr += ` - ${description}`;
31350
31377
  paramDescriptions.push(paramStr);
@@ -31355,7 +31382,7 @@ var __webpack_exports__ = {};
31355
31382
  function isZodOptional(value) {
31356
31383
  return '_def' in value && value._def?.typeName === 'ZodOptional';
31357
31384
  }
31358
- function isZodObject(value) {
31385
+ function tool_generator_isZodObject(value) {
31359
31386
  return '_def' in value && value._def?.typeName === 'ZodObject' && 'shape' in value;
31360
31387
  }
31361
31388
  function unwrapOptional(value) {
@@ -31369,7 +31396,7 @@ var __webpack_exports__ = {};
31369
31396
  };
31370
31397
  }
31371
31398
  function isLocateField(value) {
31372
- if (!isZodObject(value)) return false;
31399
+ if (!tool_generator_isZodObject(value)) return false;
31373
31400
  return 'prompt' in value.shape;
31374
31401
  }
31375
31402
  function makePromptOptional(value, wrapInOptional) {
@@ -31383,7 +31410,7 @@ var __webpack_exports__ = {};
31383
31410
  }
31384
31411
  function transformSchemaField(key, value) {
31385
31412
  const { innerValue, isOptional } = unwrapOptional(value);
31386
- if (isZodObject(innerValue) && isLocateField(innerValue)) return [
31413
+ if (tool_generator_isZodObject(innerValue) && isLocateField(innerValue)) return [
31387
31414
  key,
31388
31415
  makePromptOptional(innerValue, isOptional)
31389
31416
  ];
@@ -31395,7 +31422,7 @@ var __webpack_exports__ = {};
31395
31422
  function extractActionSchema(paramSchema) {
31396
31423
  if (!paramSchema) return {};
31397
31424
  const schema = paramSchema;
31398
- if (!isZodObject(schema)) return schema;
31425
+ if (!tool_generator_isZodObject(schema)) return schema;
31399
31426
  return Object.fromEntries(Object.entries(schema.shape).map(([key, value])=>transformSchemaField(key, value)));
31400
31427
  }
31401
31428
  function serializeArgsToDescription(args) {
@@ -31782,7 +31809,7 @@ For more information, visit: https://midscenejs.com/mcp-migration
31782
31809
  constructor(){
31783
31810
  super({
31784
31811
  name: '@midscene/mcp',
31785
- version: '1.2.1-beta-20260113073450.0',
31812
+ version: '1.2.1-beta-20260114072539.0',
31786
31813
  description: 'Deprecated - Use @midscene/web-bridge-mcp, @midscene/android-mcp, or @midscene/ios-mcp'
31787
31814
  });
31788
31815
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/mcp",
3
- "version": "1.2.1-beta-20260113073450.0",
3
+ "version": "1.2.1-beta-20260114072539.0",
4
4
  "description": "Deprecated - Use @midscene/web-bridge-mcp, @midscene/android-mcp, or @midscene/ios-mcp",
5
5
  "bin": "dist/index.js",
6
6
  "files": [
@@ -25,11 +25,11 @@
25
25
  "@rslib/core": "^0.18.3",
26
26
  "@types/node": "^18.0.0",
27
27
  "typescript": "^5.8.3",
28
- "@midscene/core": "1.2.1-beta-20260113073450.0",
28
+ "@midscene/android": "1.2.1-beta-20260114072539.0",
29
29
  "@midscene/report": "1.0.0",
30
- "@midscene/shared": "1.2.1-beta-20260113073450.0",
31
- "@midscene/android": "1.2.1-beta-20260113073450.0",
32
- "@midscene/web": "1.2.1-beta-20260113073450.0"
30
+ "@midscene/core": "1.2.1-beta-20260114072539.0",
31
+ "@midscene/shared": "1.2.1-beta-20260114072539.0",
32
+ "@midscene/web": "1.2.1-beta-20260114072539.0"
33
33
  },
34
34
  "license": "MIT",
35
35
  "scripts": {