@midscene/mcp 1.2.1-beta-20260113073450.0 → 1.2.1-beta-20260115021413.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 +14 -19
- package/dist/server.js +14 -19
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -21737,7 +21737,8 @@ 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
|
+
'glm-v'
|
|
21741
21742
|
];
|
|
21742
21743
|
[
|
|
21743
21744
|
...VL_MODE_RAW_VALID_VALUES
|
|
@@ -24035,12 +24036,6 @@ var __webpack_modules__ = {
|
|
|
24035
24036
|
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
24037
|
result: lib.z.boolean().describe('The result of the assertion, true or false')
|
|
24037
24038
|
});
|
|
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
24039
|
require("node:assert");
|
|
24045
24040
|
__webpack_require__("../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/index.js");
|
|
24046
24041
|
__webpack_require__("../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js");
|
|
@@ -24094,7 +24089,7 @@ var __webpack_modules__ = {
|
|
|
24094
24089
|
}
|
|
24095
24090
|
return false;
|
|
24096
24091
|
}
|
|
24097
|
-
function
|
|
24092
|
+
function zod_schema_utils_getZodTypeName(field, locatorTypeDescription) {
|
|
24098
24093
|
const actualField = unwrapZodField(field);
|
|
24099
24094
|
const fieldTypeName = actualField._def?.typeName;
|
|
24100
24095
|
if ('ZodString' === fieldTypeName) return 'string';
|
|
@@ -24112,14 +24107,14 @@ var __webpack_modules__ = {
|
|
|
24112
24107
|
if ('ZodUnion' === fieldTypeName) {
|
|
24113
24108
|
const options = actualField._def?.options;
|
|
24114
24109
|
if (options && options.length > 0) {
|
|
24115
|
-
const types = options.map((opt)=>
|
|
24110
|
+
const types = options.map((opt)=>zod_schema_utils_getZodTypeName(opt, locatorTypeDescription));
|
|
24116
24111
|
return types.join(' | ');
|
|
24117
24112
|
}
|
|
24118
24113
|
return 'union';
|
|
24119
24114
|
}
|
|
24120
24115
|
return 'unknown';
|
|
24121
24116
|
}
|
|
24122
|
-
function
|
|
24117
|
+
function zod_schema_utils_getZodDescription(field) {
|
|
24123
24118
|
if ("description" in field) return field.description || null;
|
|
24124
24119
|
const actualField = unwrapZodField(field);
|
|
24125
24120
|
if ("description" in actualField) return actualField.description || null;
|
|
@@ -24135,16 +24130,16 @@ var __webpack_modules__ = {
|
|
|
24135
24130
|
const schema = action.paramSchema;
|
|
24136
24131
|
const isZodObjectType = schema._def?.typeName === 'ZodObject';
|
|
24137
24132
|
if (!isZodObjectType || !schema.shape) {
|
|
24138
|
-
const typeName =
|
|
24139
|
-
const description =
|
|
24133
|
+
const typeName = zod_schema_utils_getZodTypeName(schema);
|
|
24134
|
+
const description = zod_schema_utils_getZodDescription(schema);
|
|
24140
24135
|
const paramDesc = description ? `${typeName} - ${description}` : typeName;
|
|
24141
24136
|
return `${action.name} action, ${actionDesc}. Parameter: ${paramDesc}`;
|
|
24142
24137
|
}
|
|
24143
24138
|
const paramDescriptions = [];
|
|
24144
24139
|
for (const [key, field] of Object.entries(schema.shape))if (field && 'object' == typeof field) {
|
|
24145
24140
|
const isFieldOptional = 'function' == typeof field.isOptional && field.isOptional();
|
|
24146
|
-
const typeName =
|
|
24147
|
-
const description =
|
|
24141
|
+
const typeName = zod_schema_utils_getZodTypeName(field);
|
|
24142
|
+
const description = zod_schema_utils_getZodDescription(field);
|
|
24148
24143
|
let paramStr = `${key}${isFieldOptional ? '?' : ''} (${typeName})`;
|
|
24149
24144
|
if (description) paramStr += ` - ${description}`;
|
|
24150
24145
|
paramDescriptions.push(paramStr);
|
|
@@ -24155,7 +24150,7 @@ var __webpack_modules__ = {
|
|
|
24155
24150
|
function isZodOptional(value) {
|
|
24156
24151
|
return '_def' in value && value._def?.typeName === 'ZodOptional';
|
|
24157
24152
|
}
|
|
24158
|
-
function
|
|
24153
|
+
function tool_generator_isZodObject(value) {
|
|
24159
24154
|
return '_def' in value && value._def?.typeName === 'ZodObject' && 'shape' in value;
|
|
24160
24155
|
}
|
|
24161
24156
|
function unwrapOptional(value) {
|
|
@@ -24169,7 +24164,7 @@ var __webpack_modules__ = {
|
|
|
24169
24164
|
};
|
|
24170
24165
|
}
|
|
24171
24166
|
function isLocateField(value) {
|
|
24172
|
-
if (!
|
|
24167
|
+
if (!tool_generator_isZodObject(value)) return false;
|
|
24173
24168
|
return 'prompt' in value.shape;
|
|
24174
24169
|
}
|
|
24175
24170
|
function makePromptOptional(value, wrapInOptional) {
|
|
@@ -24183,7 +24178,7 @@ var __webpack_modules__ = {
|
|
|
24183
24178
|
}
|
|
24184
24179
|
function transformSchemaField(key, value) {
|
|
24185
24180
|
const { innerValue, isOptional } = unwrapOptional(value);
|
|
24186
|
-
if (
|
|
24181
|
+
if (tool_generator_isZodObject(innerValue) && isLocateField(innerValue)) return [
|
|
24187
24182
|
key,
|
|
24188
24183
|
makePromptOptional(innerValue, isOptional)
|
|
24189
24184
|
];
|
|
@@ -24195,7 +24190,7 @@ var __webpack_modules__ = {
|
|
|
24195
24190
|
function extractActionSchema(paramSchema) {
|
|
24196
24191
|
if (!paramSchema) return {};
|
|
24197
24192
|
const schema = paramSchema;
|
|
24198
|
-
if (!
|
|
24193
|
+
if (!tool_generator_isZodObject(schema)) return schema;
|
|
24199
24194
|
return Object.fromEntries(Object.entries(schema.shape).map(([key, value])=>transformSchemaField(key, value)));
|
|
24200
24195
|
}
|
|
24201
24196
|
function serializeArgsToDescription(args) {
|
|
@@ -24582,7 +24577,7 @@ For more information, visit: https://midscenejs.com/mcp-migration
|
|
|
24582
24577
|
constructor(){
|
|
24583
24578
|
super({
|
|
24584
24579
|
name: '@midscene/mcp',
|
|
24585
|
-
version: '1.2.1-beta-
|
|
24580
|
+
version: '1.2.1-beta-20260115021413.0',
|
|
24586
24581
|
description: 'Deprecated - Use @midscene/web-bridge-mcp, @midscene/android-mcp, or @midscene/ios-mcp'
|
|
24587
24582
|
});
|
|
24588
24583
|
}
|
package/dist/server.js
CHANGED
|
@@ -28937,7 +28937,8 @@ 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
|
+
'glm-v'
|
|
28941
28942
|
];
|
|
28942
28943
|
[
|
|
28943
28944
|
...VL_MODE_RAW_VALID_VALUES
|
|
@@ -31235,12 +31236,6 @@ var __webpack_exports__ = {};
|
|
|
31235
31236
|
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
31237
|
result: lib.z.boolean().describe('The result of the assertion, true or false')
|
|
31237
31238
|
});
|
|
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
31239
|
require("node:assert");
|
|
31245
31240
|
__webpack_require__("../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/index.js");
|
|
31246
31241
|
__webpack_require__("../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js");
|
|
@@ -31294,7 +31289,7 @@ var __webpack_exports__ = {};
|
|
|
31294
31289
|
}
|
|
31295
31290
|
return false;
|
|
31296
31291
|
}
|
|
31297
|
-
function
|
|
31292
|
+
function zod_schema_utils_getZodTypeName(field, locatorTypeDescription) {
|
|
31298
31293
|
const actualField = unwrapZodField(field);
|
|
31299
31294
|
const fieldTypeName = actualField._def?.typeName;
|
|
31300
31295
|
if ('ZodString' === fieldTypeName) return 'string';
|
|
@@ -31312,14 +31307,14 @@ var __webpack_exports__ = {};
|
|
|
31312
31307
|
if ('ZodUnion' === fieldTypeName) {
|
|
31313
31308
|
const options = actualField._def?.options;
|
|
31314
31309
|
if (options && options.length > 0) {
|
|
31315
|
-
const types = options.map((opt)=>
|
|
31310
|
+
const types = options.map((opt)=>zod_schema_utils_getZodTypeName(opt, locatorTypeDescription));
|
|
31316
31311
|
return types.join(' | ');
|
|
31317
31312
|
}
|
|
31318
31313
|
return 'union';
|
|
31319
31314
|
}
|
|
31320
31315
|
return 'unknown';
|
|
31321
31316
|
}
|
|
31322
|
-
function
|
|
31317
|
+
function zod_schema_utils_getZodDescription(field) {
|
|
31323
31318
|
if ("description" in field) return field.description || null;
|
|
31324
31319
|
const actualField = unwrapZodField(field);
|
|
31325
31320
|
if ("description" in actualField) return actualField.description || null;
|
|
@@ -31335,16 +31330,16 @@ var __webpack_exports__ = {};
|
|
|
31335
31330
|
const schema = action.paramSchema;
|
|
31336
31331
|
const isZodObjectType = schema._def?.typeName === 'ZodObject';
|
|
31337
31332
|
if (!isZodObjectType || !schema.shape) {
|
|
31338
|
-
const typeName =
|
|
31339
|
-
const description =
|
|
31333
|
+
const typeName = zod_schema_utils_getZodTypeName(schema);
|
|
31334
|
+
const description = zod_schema_utils_getZodDescription(schema);
|
|
31340
31335
|
const paramDesc = description ? `${typeName} - ${description}` : typeName;
|
|
31341
31336
|
return `${action.name} action, ${actionDesc}. Parameter: ${paramDesc}`;
|
|
31342
31337
|
}
|
|
31343
31338
|
const paramDescriptions = [];
|
|
31344
31339
|
for (const [key, field] of Object.entries(schema.shape))if (field && 'object' == typeof field) {
|
|
31345
31340
|
const isFieldOptional = 'function' == typeof field.isOptional && field.isOptional();
|
|
31346
|
-
const typeName =
|
|
31347
|
-
const description =
|
|
31341
|
+
const typeName = zod_schema_utils_getZodTypeName(field);
|
|
31342
|
+
const description = zod_schema_utils_getZodDescription(field);
|
|
31348
31343
|
let paramStr = `${key}${isFieldOptional ? '?' : ''} (${typeName})`;
|
|
31349
31344
|
if (description) paramStr += ` - ${description}`;
|
|
31350
31345
|
paramDescriptions.push(paramStr);
|
|
@@ -31355,7 +31350,7 @@ var __webpack_exports__ = {};
|
|
|
31355
31350
|
function isZodOptional(value) {
|
|
31356
31351
|
return '_def' in value && value._def?.typeName === 'ZodOptional';
|
|
31357
31352
|
}
|
|
31358
|
-
function
|
|
31353
|
+
function tool_generator_isZodObject(value) {
|
|
31359
31354
|
return '_def' in value && value._def?.typeName === 'ZodObject' && 'shape' in value;
|
|
31360
31355
|
}
|
|
31361
31356
|
function unwrapOptional(value) {
|
|
@@ -31369,7 +31364,7 @@ var __webpack_exports__ = {};
|
|
|
31369
31364
|
};
|
|
31370
31365
|
}
|
|
31371
31366
|
function isLocateField(value) {
|
|
31372
|
-
if (!
|
|
31367
|
+
if (!tool_generator_isZodObject(value)) return false;
|
|
31373
31368
|
return 'prompt' in value.shape;
|
|
31374
31369
|
}
|
|
31375
31370
|
function makePromptOptional(value, wrapInOptional) {
|
|
@@ -31383,7 +31378,7 @@ var __webpack_exports__ = {};
|
|
|
31383
31378
|
}
|
|
31384
31379
|
function transformSchemaField(key, value) {
|
|
31385
31380
|
const { innerValue, isOptional } = unwrapOptional(value);
|
|
31386
|
-
if (
|
|
31381
|
+
if (tool_generator_isZodObject(innerValue) && isLocateField(innerValue)) return [
|
|
31387
31382
|
key,
|
|
31388
31383
|
makePromptOptional(innerValue, isOptional)
|
|
31389
31384
|
];
|
|
@@ -31395,7 +31390,7 @@ var __webpack_exports__ = {};
|
|
|
31395
31390
|
function extractActionSchema(paramSchema) {
|
|
31396
31391
|
if (!paramSchema) return {};
|
|
31397
31392
|
const schema = paramSchema;
|
|
31398
|
-
if (!
|
|
31393
|
+
if (!tool_generator_isZodObject(schema)) return schema;
|
|
31399
31394
|
return Object.fromEntries(Object.entries(schema.shape).map(([key, value])=>transformSchemaField(key, value)));
|
|
31400
31395
|
}
|
|
31401
31396
|
function serializeArgsToDescription(args) {
|
|
@@ -31782,7 +31777,7 @@ For more information, visit: https://midscenejs.com/mcp-migration
|
|
|
31782
31777
|
constructor(){
|
|
31783
31778
|
super({
|
|
31784
31779
|
name: '@midscene/mcp',
|
|
31785
|
-
version: '1.2.1-beta-
|
|
31780
|
+
version: '1.2.1-beta-20260115021413.0',
|
|
31786
31781
|
description: 'Deprecated - Use @midscene/web-bridge-mcp, @midscene/android-mcp, or @midscene/ios-mcp'
|
|
31787
31782
|
});
|
|
31788
31783
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/mcp",
|
|
3
|
-
"version": "1.2.1-beta-
|
|
3
|
+
"version": "1.2.1-beta-20260115021413.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-
|
|
28
|
+
"@midscene/core": "1.2.1-beta-20260115021413.0",
|
|
29
|
+
"@midscene/android": "1.2.1-beta-20260115021413.0",
|
|
29
30
|
"@midscene/report": "1.0.0",
|
|
30
|
-
"@midscene/shared": "1.2.1-beta-
|
|
31
|
-
"@midscene/
|
|
32
|
-
"@midscene/web": "1.2.1-beta-20260113073450.0"
|
|
31
|
+
"@midscene/shared": "1.2.1-beta-20260115021413.0",
|
|
32
|
+
"@midscene/web": "1.2.1-beta-20260115021413.0"
|
|
33
33
|
},
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"scripts": {
|