@midscene/ios 1.9.7 → 1.9.8-beta-20260618014851.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/es/cli.mjs +12 -10
- package/dist/es/index.mjs +11 -9
- package/dist/lib/cli.js +12 -10
- package/dist/lib/index.js +11 -9
- package/dist/types/index.d.ts +5 -4
- package/package.json +5 -10
- package/static/index.html +1 -1
- package/static/static/js/index.b4cb2178.js +948 -0
- package/static/static/js/index.b4cb2178.js.map +1 -0
- package/dist/es/mcp-server.mjs +0 -1483
- package/dist/lib/mcp-server.js +0 -1533
- package/dist/types/mcp-server.d.ts +0 -250
- package/static/static/js/index.50e06ed5.js +0 -948
- package/static/static/js/index.50e06ed5.js.map +0 -1
- /package/static/static/js/{index.50e06ed5.js.LICENSE.txt → index.b4cb2178.js.LICENSE.txt} +0 -0
package/dist/es/cli.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createReportCliCommands, z } from "@midscene/core";
|
|
2
2
|
import { reportCLIError, runToolsCLI } from "@midscene/shared/cli";
|
|
3
|
+
import { agentBehaviorInitArgShape, getAgentInitArgsSignature, shouldRebuildAgentForInitArgs } from "@midscene/shared/agent-tools/agent-behavior-init-args";
|
|
4
|
+
import { BaseMidsceneTools } from "@midscene/shared/agent-tools/base-tools";
|
|
3
5
|
import { getDebug } from "@midscene/shared/logger";
|
|
4
|
-
import { BaseMidsceneTools } from "@midscene/shared/mcp/base-tools";
|
|
5
6
|
import { Agent } from "@midscene/core/agent";
|
|
6
7
|
import { MIDSCENE_IOS_DEVICE_CLASS_OVERRIDE } from "@midscene/shared/env";
|
|
7
8
|
import { mergeAndNormalizeAppNameMapping, normalizeForComparison } from "@midscene/shared/utils";
|
|
@@ -1339,7 +1340,7 @@ async function agentFromWebDriverAgent(opts) {
|
|
|
1339
1340
|
await device.connect();
|
|
1340
1341
|
return new IOSAgent(device, opts);
|
|
1341
1342
|
}
|
|
1342
|
-
function
|
|
1343
|
+
function agent_tools_define_property(obj, key, value) {
|
|
1343
1344
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
1344
1345
|
value: value,
|
|
1345
1346
|
enumerable: true,
|
|
@@ -1349,14 +1350,15 @@ function mcp_tools_define_property(obj, key, value) {
|
|
|
1349
1350
|
else obj[key] = value;
|
|
1350
1351
|
return obj;
|
|
1351
1352
|
}
|
|
1352
|
-
const debug = getDebug('
|
|
1353
|
+
const debug = getDebug('agent-tools:ios');
|
|
1353
1354
|
const iosInitArgShape = {
|
|
1354
1355
|
deviceId: z.string().optional().describe('iOS device UDID (optional when WDA auto-detect is sufficient)'),
|
|
1355
1356
|
wdaHost: z.string().optional().describe('WebDriverAgent host, defaults to localhost'),
|
|
1356
1357
|
wdaPort: z.number().optional().describe('WebDriverAgent port'),
|
|
1357
1358
|
sessionId: z.string().optional().describe('Existing WebDriverAgent session ID to reuse'),
|
|
1358
1359
|
useWDA: z.boolean().optional().describe('Whether to reuse an existing WebDriverAgent session'),
|
|
1359
|
-
wdaMjpegPort: z.number().optional().describe('WebDriverAgent MJPEG streaming port')
|
|
1360
|
+
wdaMjpegPort: z.number().optional().describe('WebDriverAgent MJPEG streaming port'),
|
|
1361
|
+
...agentBehaviorInitArgShape
|
|
1360
1362
|
};
|
|
1361
1363
|
function getTargetIdentity(initArgs) {
|
|
1362
1364
|
if (initArgs?.deviceId) return initArgs.sessionId ? `${initArgs.deviceId}-session-${initArgs.sessionId}` : initArgs.deviceId;
|
|
@@ -1376,9 +1378,8 @@ class IOSMidsceneTools extends BaseMidsceneTools {
|
|
|
1376
1378
|
return new IOSDevice({});
|
|
1377
1379
|
}
|
|
1378
1380
|
async ensureAgent(opts) {
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1381
|
-
if (this.agent && hasOpts && nextSignature !== this.lastOptsSignature) {
|
|
1381
|
+
const nextSignature = getAgentInitArgsSignature(opts);
|
|
1382
|
+
if (this.agent && shouldRebuildAgentForInitArgs(this.lastOptsSignature, nextSignature)) {
|
|
1382
1383
|
try {
|
|
1383
1384
|
await this.agent.destroy?.();
|
|
1384
1385
|
} catch (error) {
|
|
@@ -1416,6 +1417,7 @@ class IOSMidsceneTools extends BaseMidsceneTools {
|
|
|
1416
1417
|
debug('Failed to destroy agent during connect:', error);
|
|
1417
1418
|
}
|
|
1418
1419
|
this.agent = void 0;
|
|
1420
|
+
this.lastOptsSignature = void 0;
|
|
1419
1421
|
}
|
|
1420
1422
|
const agent = await this.ensureAgent(initArgs);
|
|
1421
1423
|
const screenshot = await agent.page.screenshotBase64();
|
|
@@ -1440,20 +1442,20 @@ class IOSMidsceneTools extends BaseMidsceneTools {
|
|
|
1440
1442
|
];
|
|
1441
1443
|
}
|
|
1442
1444
|
constructor(...args){
|
|
1443
|
-
super(...args),
|
|
1445
|
+
super(...args), agent_tools_define_property(this, "initArgSpec", {
|
|
1444
1446
|
namespace: 'ios',
|
|
1445
1447
|
shape: iosInitArgShape,
|
|
1446
1448
|
cli: {
|
|
1447
1449
|
preferBareKeys: true
|
|
1448
1450
|
},
|
|
1449
1451
|
adapt: (extracted)=>extracted
|
|
1450
|
-
}),
|
|
1452
|
+
}), agent_tools_define_property(this, "lastOptsSignature", void 0);
|
|
1451
1453
|
}
|
|
1452
1454
|
}
|
|
1453
1455
|
const tools = new IOSMidsceneTools();
|
|
1454
1456
|
runToolsCLI(tools, 'midscene-ios', {
|
|
1455
1457
|
stripPrefix: 'ios_',
|
|
1456
|
-
version: "1.9.
|
|
1458
|
+
version: "1.9.8-beta-20260618014851.0",
|
|
1457
1459
|
extraCommands: createReportCliCommands()
|
|
1458
1460
|
}).catch((e)=>{
|
|
1459
1461
|
process.exit(reportCLIError(e));
|
package/dist/es/index.mjs
CHANGED
|
@@ -9,7 +9,8 @@ import { mergeAndNormalizeAppNameMapping, normalizeForComparison } from "@midsce
|
|
|
9
9
|
import { WDAManager, WebDriverClient } from "@midscene/webdriver";
|
|
10
10
|
import { Agent } from "@midscene/core/agent";
|
|
11
11
|
import { MIDSCENE_IOS_DEVICE_CLASS_OVERRIDE, overrideAIConfig } from "@midscene/shared/env";
|
|
12
|
-
import {
|
|
12
|
+
import { agentBehaviorInitArgShape, getAgentInitArgsSignature, shouldRebuildAgentForInitArgs } from "@midscene/shared/agent-tools/agent-behavior-init-args";
|
|
13
|
+
import { BaseMidsceneTools } from "@midscene/shared/agent-tools/base-tools";
|
|
13
14
|
import { exec } from "node:child_process";
|
|
14
15
|
import { platform } from "node:os";
|
|
15
16
|
import { promisify } from "node:util";
|
|
@@ -1344,7 +1345,7 @@ async function agentFromWebDriverAgent(opts) {
|
|
|
1344
1345
|
await device.connect();
|
|
1345
1346
|
return new IOSAgent(device, opts);
|
|
1346
1347
|
}
|
|
1347
|
-
function
|
|
1348
|
+
function agent_tools_define_property(obj, key, value) {
|
|
1348
1349
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
1349
1350
|
value: value,
|
|
1350
1351
|
enumerable: true,
|
|
@@ -1354,14 +1355,15 @@ function mcp_tools_define_property(obj, key, value) {
|
|
|
1354
1355
|
else obj[key] = value;
|
|
1355
1356
|
return obj;
|
|
1356
1357
|
}
|
|
1357
|
-
const debug = getDebug('
|
|
1358
|
+
const debug = getDebug('agent-tools:ios');
|
|
1358
1359
|
const iosInitArgShape = {
|
|
1359
1360
|
deviceId: z.string().optional().describe('iOS device UDID (optional when WDA auto-detect is sufficient)'),
|
|
1360
1361
|
wdaHost: z.string().optional().describe('WebDriverAgent host, defaults to localhost'),
|
|
1361
1362
|
wdaPort: z.number().optional().describe('WebDriverAgent port'),
|
|
1362
1363
|
sessionId: z.string().optional().describe('Existing WebDriverAgent session ID to reuse'),
|
|
1363
1364
|
useWDA: z.boolean().optional().describe('Whether to reuse an existing WebDriverAgent session'),
|
|
1364
|
-
wdaMjpegPort: z.number().optional().describe('WebDriverAgent MJPEG streaming port')
|
|
1365
|
+
wdaMjpegPort: z.number().optional().describe('WebDriverAgent MJPEG streaming port'),
|
|
1366
|
+
...agentBehaviorInitArgShape
|
|
1365
1367
|
};
|
|
1366
1368
|
function getTargetIdentity(initArgs) {
|
|
1367
1369
|
if (initArgs?.deviceId) return initArgs.sessionId ? `${initArgs.deviceId}-session-${initArgs.sessionId}` : initArgs.deviceId;
|
|
@@ -1381,9 +1383,8 @@ class IOSMidsceneTools extends BaseMidsceneTools {
|
|
|
1381
1383
|
return new IOSDevice({});
|
|
1382
1384
|
}
|
|
1383
1385
|
async ensureAgent(opts) {
|
|
1384
|
-
const
|
|
1385
|
-
|
|
1386
|
-
if (this.agent && hasOpts && nextSignature !== this.lastOptsSignature) {
|
|
1386
|
+
const nextSignature = getAgentInitArgsSignature(opts);
|
|
1387
|
+
if (this.agent && shouldRebuildAgentForInitArgs(this.lastOptsSignature, nextSignature)) {
|
|
1387
1388
|
try {
|
|
1388
1389
|
await this.agent.destroy?.();
|
|
1389
1390
|
} catch (error) {
|
|
@@ -1421,6 +1422,7 @@ class IOSMidsceneTools extends BaseMidsceneTools {
|
|
|
1421
1422
|
debug('Failed to destroy agent during connect:', error);
|
|
1422
1423
|
}
|
|
1423
1424
|
this.agent = void 0;
|
|
1425
|
+
this.lastOptsSignature = void 0;
|
|
1424
1426
|
}
|
|
1425
1427
|
const agent = await this.ensureAgent(initArgs);
|
|
1426
1428
|
const screenshot = await agent.page.screenshotBase64();
|
|
@@ -1445,14 +1447,14 @@ class IOSMidsceneTools extends BaseMidsceneTools {
|
|
|
1445
1447
|
];
|
|
1446
1448
|
}
|
|
1447
1449
|
constructor(...args){
|
|
1448
|
-
super(...args),
|
|
1450
|
+
super(...args), agent_tools_define_property(this, "initArgSpec", {
|
|
1449
1451
|
namespace: 'ios',
|
|
1450
1452
|
shape: iosInitArgShape,
|
|
1451
1453
|
cli: {
|
|
1452
1454
|
preferBareKeys: true
|
|
1453
1455
|
},
|
|
1454
1456
|
adapt: (extracted)=>extracted
|
|
1455
|
-
}),
|
|
1457
|
+
}), agent_tools_define_property(this, "lastOptsSignature", void 0);
|
|
1456
1458
|
}
|
|
1457
1459
|
}
|
|
1458
1460
|
const execAsync = promisify(exec);
|
package/dist/lib/cli.js
CHANGED
|
@@ -23,8 +23,9 @@ var __webpack_require__ = {};
|
|
|
23
23
|
var __webpack_exports__ = {};
|
|
24
24
|
const core_namespaceObject = require("@midscene/core");
|
|
25
25
|
const cli_namespaceObject = require("@midscene/shared/cli");
|
|
26
|
+
const agent_behavior_init_args_namespaceObject = require("@midscene/shared/agent-tools/agent-behavior-init-args");
|
|
27
|
+
const base_tools_namespaceObject = require("@midscene/shared/agent-tools/base-tools");
|
|
26
28
|
const logger_namespaceObject = require("@midscene/shared/logger");
|
|
27
|
-
const base_tools_namespaceObject = require("@midscene/shared/mcp/base-tools");
|
|
28
29
|
const agent_namespaceObject = require("@midscene/core/agent");
|
|
29
30
|
const env_namespaceObject = require("@midscene/shared/env");
|
|
30
31
|
const utils_namespaceObject = require("@midscene/shared/utils");
|
|
@@ -1363,7 +1364,7 @@ async function agentFromWebDriverAgent(opts) {
|
|
|
1363
1364
|
await device.connect();
|
|
1364
1365
|
return new IOSAgent(device, opts);
|
|
1365
1366
|
}
|
|
1366
|
-
function
|
|
1367
|
+
function agent_tools_define_property(obj, key, value) {
|
|
1367
1368
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
1368
1369
|
value: value,
|
|
1369
1370
|
enumerable: true,
|
|
@@ -1373,14 +1374,15 @@ function mcp_tools_define_property(obj, key, value) {
|
|
|
1373
1374
|
else obj[key] = value;
|
|
1374
1375
|
return obj;
|
|
1375
1376
|
}
|
|
1376
|
-
const debug = (0, logger_namespaceObject.getDebug)('
|
|
1377
|
+
const debug = (0, logger_namespaceObject.getDebug)('agent-tools:ios');
|
|
1377
1378
|
const iosInitArgShape = {
|
|
1378
1379
|
deviceId: core_namespaceObject.z.string().optional().describe('iOS device UDID (optional when WDA auto-detect is sufficient)'),
|
|
1379
1380
|
wdaHost: core_namespaceObject.z.string().optional().describe('WebDriverAgent host, defaults to localhost'),
|
|
1380
1381
|
wdaPort: core_namespaceObject.z.number().optional().describe('WebDriverAgent port'),
|
|
1381
1382
|
sessionId: core_namespaceObject.z.string().optional().describe('Existing WebDriverAgent session ID to reuse'),
|
|
1382
1383
|
useWDA: core_namespaceObject.z.boolean().optional().describe('Whether to reuse an existing WebDriverAgent session'),
|
|
1383
|
-
wdaMjpegPort: core_namespaceObject.z.number().optional().describe('WebDriverAgent MJPEG streaming port')
|
|
1384
|
+
wdaMjpegPort: core_namespaceObject.z.number().optional().describe('WebDriverAgent MJPEG streaming port'),
|
|
1385
|
+
...agent_behavior_init_args_namespaceObject.agentBehaviorInitArgShape
|
|
1384
1386
|
};
|
|
1385
1387
|
function getTargetIdentity(initArgs) {
|
|
1386
1388
|
if (initArgs?.deviceId) return initArgs.sessionId ? `${initArgs.deviceId}-session-${initArgs.sessionId}` : initArgs.deviceId;
|
|
@@ -1400,9 +1402,8 @@ class IOSMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools {
|
|
|
1400
1402
|
return new IOSDevice({});
|
|
1401
1403
|
}
|
|
1402
1404
|
async ensureAgent(opts) {
|
|
1403
|
-
const
|
|
1404
|
-
|
|
1405
|
-
if (this.agent && hasOpts && nextSignature !== this.lastOptsSignature) {
|
|
1405
|
+
const nextSignature = (0, agent_behavior_init_args_namespaceObject.getAgentInitArgsSignature)(opts);
|
|
1406
|
+
if (this.agent && (0, agent_behavior_init_args_namespaceObject.shouldRebuildAgentForInitArgs)(this.lastOptsSignature, nextSignature)) {
|
|
1406
1407
|
try {
|
|
1407
1408
|
await this.agent.destroy?.();
|
|
1408
1409
|
} catch (error) {
|
|
@@ -1440,6 +1441,7 @@ class IOSMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools {
|
|
|
1440
1441
|
debug('Failed to destroy agent during connect:', error);
|
|
1441
1442
|
}
|
|
1442
1443
|
this.agent = void 0;
|
|
1444
|
+
this.lastOptsSignature = void 0;
|
|
1443
1445
|
}
|
|
1444
1446
|
const agent = await this.ensureAgent(initArgs);
|
|
1445
1447
|
const screenshot = await agent.page.screenshotBase64();
|
|
@@ -1464,20 +1466,20 @@ class IOSMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools {
|
|
|
1464
1466
|
];
|
|
1465
1467
|
}
|
|
1466
1468
|
constructor(...args){
|
|
1467
|
-
super(...args),
|
|
1469
|
+
super(...args), agent_tools_define_property(this, "initArgSpec", {
|
|
1468
1470
|
namespace: 'ios',
|
|
1469
1471
|
shape: iosInitArgShape,
|
|
1470
1472
|
cli: {
|
|
1471
1473
|
preferBareKeys: true
|
|
1472
1474
|
},
|
|
1473
1475
|
adapt: (extracted)=>extracted
|
|
1474
|
-
}),
|
|
1476
|
+
}), agent_tools_define_property(this, "lastOptsSignature", void 0);
|
|
1475
1477
|
}
|
|
1476
1478
|
}
|
|
1477
1479
|
const tools = new IOSMidsceneTools();
|
|
1478
1480
|
(0, cli_namespaceObject.runToolsCLI)(tools, 'midscene-ios', {
|
|
1479
1481
|
stripPrefix: 'ios_',
|
|
1480
|
-
version: "1.9.
|
|
1482
|
+
version: "1.9.8-beta-20260618014851.0",
|
|
1481
1483
|
extraCommands: (0, core_namespaceObject.createReportCliCommands)()
|
|
1482
1484
|
}).catch((e)=>{
|
|
1483
1485
|
process.exit((0, cli_namespaceObject.reportCLIError)(e));
|
package/dist/lib/index.js
CHANGED
|
@@ -1382,8 +1382,9 @@ async function agentFromWebDriverAgent(opts) {
|
|
|
1382
1382
|
await device.connect();
|
|
1383
1383
|
return new IOSAgent(device, opts);
|
|
1384
1384
|
}
|
|
1385
|
-
const
|
|
1386
|
-
|
|
1385
|
+
const agent_behavior_init_args_namespaceObject = require("@midscene/shared/agent-tools/agent-behavior-init-args");
|
|
1386
|
+
const base_tools_namespaceObject = require("@midscene/shared/agent-tools/base-tools");
|
|
1387
|
+
function agent_tools_define_property(obj, key, value) {
|
|
1387
1388
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
1388
1389
|
value: value,
|
|
1389
1390
|
enumerable: true,
|
|
@@ -1393,14 +1394,15 @@ function mcp_tools_define_property(obj, key, value) {
|
|
|
1393
1394
|
else obj[key] = value;
|
|
1394
1395
|
return obj;
|
|
1395
1396
|
}
|
|
1396
|
-
const debug = (0, logger_namespaceObject.getDebug)('
|
|
1397
|
+
const debug = (0, logger_namespaceObject.getDebug)('agent-tools:ios');
|
|
1397
1398
|
const iosInitArgShape = {
|
|
1398
1399
|
deviceId: core_namespaceObject.z.string().optional().describe('iOS device UDID (optional when WDA auto-detect is sufficient)'),
|
|
1399
1400
|
wdaHost: core_namespaceObject.z.string().optional().describe('WebDriverAgent host, defaults to localhost'),
|
|
1400
1401
|
wdaPort: core_namespaceObject.z.number().optional().describe('WebDriverAgent port'),
|
|
1401
1402
|
sessionId: core_namespaceObject.z.string().optional().describe('Existing WebDriverAgent session ID to reuse'),
|
|
1402
1403
|
useWDA: core_namespaceObject.z.boolean().optional().describe('Whether to reuse an existing WebDriverAgent session'),
|
|
1403
|
-
wdaMjpegPort: core_namespaceObject.z.number().optional().describe('WebDriverAgent MJPEG streaming port')
|
|
1404
|
+
wdaMjpegPort: core_namespaceObject.z.number().optional().describe('WebDriverAgent MJPEG streaming port'),
|
|
1405
|
+
...agent_behavior_init_args_namespaceObject.agentBehaviorInitArgShape
|
|
1404
1406
|
};
|
|
1405
1407
|
function getTargetIdentity(initArgs) {
|
|
1406
1408
|
if (initArgs?.deviceId) return initArgs.sessionId ? `${initArgs.deviceId}-session-${initArgs.sessionId}` : initArgs.deviceId;
|
|
@@ -1420,9 +1422,8 @@ class IOSMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools {
|
|
|
1420
1422
|
return new IOSDevice({});
|
|
1421
1423
|
}
|
|
1422
1424
|
async ensureAgent(opts) {
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1425
|
-
if (this.agent && hasOpts && nextSignature !== this.lastOptsSignature) {
|
|
1425
|
+
const nextSignature = (0, agent_behavior_init_args_namespaceObject.getAgentInitArgsSignature)(opts);
|
|
1426
|
+
if (this.agent && (0, agent_behavior_init_args_namespaceObject.shouldRebuildAgentForInitArgs)(this.lastOptsSignature, nextSignature)) {
|
|
1426
1427
|
try {
|
|
1427
1428
|
await this.agent.destroy?.();
|
|
1428
1429
|
} catch (error) {
|
|
@@ -1460,6 +1461,7 @@ class IOSMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools {
|
|
|
1460
1461
|
debug('Failed to destroy agent during connect:', error);
|
|
1461
1462
|
}
|
|
1462
1463
|
this.agent = void 0;
|
|
1464
|
+
this.lastOptsSignature = void 0;
|
|
1463
1465
|
}
|
|
1464
1466
|
const agent = await this.ensureAgent(initArgs);
|
|
1465
1467
|
const screenshot = await agent.page.screenshotBase64();
|
|
@@ -1484,14 +1486,14 @@ class IOSMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools {
|
|
|
1484
1486
|
];
|
|
1485
1487
|
}
|
|
1486
1488
|
constructor(...args){
|
|
1487
|
-
super(...args),
|
|
1489
|
+
super(...args), agent_tools_define_property(this, "initArgSpec", {
|
|
1488
1490
|
namespace: 'ios',
|
|
1489
1491
|
shape: iosInitArgShape,
|
|
1490
1492
|
cli: {
|
|
1491
1493
|
preferBareKeys: true
|
|
1492
1494
|
},
|
|
1493
1495
|
adapt: (extracted)=>extracted
|
|
1494
|
-
}),
|
|
1496
|
+
}), agent_tools_define_property(this, "lastOptsSignature", void 0);
|
|
1495
1497
|
}
|
|
1496
1498
|
}
|
|
1497
1499
|
const external_node_child_process_namespaceObject = require("node:child_process");
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,11 +2,12 @@ import { AbstractInterface } from '@midscene/core/device';
|
|
|
2
2
|
import type { ActionParam } from '@midscene/core';
|
|
3
3
|
import type { ActionReturn } from '@midscene/core';
|
|
4
4
|
import { Agent } from '@midscene/core/agent';
|
|
5
|
+
import { AgentBehaviorInitArgs } from '@midscene/shared/agent-tools/agent-behavior-init-args';
|
|
5
6
|
import { AgentOpt } from '@midscene/core/agent';
|
|
6
|
-
import { BaseMidsceneTools } from '@midscene/shared/
|
|
7
|
+
import { BaseMidsceneTools } from '@midscene/shared/agent-tools/base-tools';
|
|
7
8
|
import { DeviceAction } from '@midscene/core';
|
|
8
9
|
import type { ElementInfo } from '@midscene/shared/extractor';
|
|
9
|
-
import { InitArgSpec } from '@midscene/shared/
|
|
10
|
+
import { InitArgSpec } from '@midscene/shared/agent-tools/base-tools';
|
|
10
11
|
import { InterfaceType } from '@midscene/core';
|
|
11
12
|
import { IOSDeviceOpt } from '@midscene/core/device';
|
|
12
13
|
import { MobileInputPrimitives } from '@midscene/core/device';
|
|
@@ -14,7 +15,7 @@ import { overrideAIConfig } from '@midscene/shared/env';
|
|
|
14
15
|
import { PlaygroundPlatformDescriptor } from '@midscene/playground';
|
|
15
16
|
import { Point } from '@midscene/core';
|
|
16
17
|
import { Size } from '@midscene/core';
|
|
17
|
-
import type { ToolDefinition } from '@midscene/shared/
|
|
18
|
+
import type { ToolDefinition } from '@midscene/shared/agent-tools/types';
|
|
18
19
|
import { WebDriverClient } from '@midscene/webdriver';
|
|
19
20
|
import { z } from '@midscene/core';
|
|
20
21
|
|
|
@@ -178,7 +179,7 @@ export declare class IOSDevice implements AbstractInterface {
|
|
|
178
179
|
destroy(): Promise<void>;
|
|
179
180
|
}
|
|
180
181
|
|
|
181
|
-
declare type IOSInitArgs = Pick<IOSDeviceOpt, 'deviceId' | 'wdaHost' | 'wdaPort' | 'sessionId' | 'useWDA' | 'wdaMjpegPort'>;
|
|
182
|
+
declare type IOSInitArgs = AgentBehaviorInitArgs & Pick<IOSDeviceOpt, 'deviceId' | 'wdaHost' | 'wdaPort' | 'sessionId' | 'useWDA' | 'wdaMjpegPort'>;
|
|
182
183
|
|
|
183
184
|
/**
|
|
184
185
|
* iOS-specific tools manager
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/ios",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.8-beta-20260618014851.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/midscene.git",
|
|
@@ -38,20 +38,15 @@
|
|
|
38
38
|
"import": "./dist/es/bin.mjs",
|
|
39
39
|
"require": "./dist/lib/bin.js"
|
|
40
40
|
},
|
|
41
|
-
"./mcp-server": {
|
|
42
|
-
"types": "./dist/types/mcp-server.d.ts",
|
|
43
|
-
"import": "./dist/es/mcp-server.mjs",
|
|
44
|
-
"require": "./dist/lib/mcp-server.js"
|
|
45
|
-
},
|
|
46
41
|
"./package.json": "./package.json"
|
|
47
42
|
},
|
|
48
43
|
"dependencies": {
|
|
49
44
|
"@inquirer/prompts": "^7.8.6",
|
|
50
45
|
"open": "10.1.0",
|
|
51
|
-
"@midscene/
|
|
52
|
-
"@midscene/
|
|
53
|
-
"@midscene/
|
|
54
|
-
"@midscene/
|
|
46
|
+
"@midscene/webdriver": "1.9.8-beta-20260618014851.0",
|
|
47
|
+
"@midscene/shared": "1.9.8-beta-20260618014851.0",
|
|
48
|
+
"@midscene/playground": "1.9.8-beta-20260618014851.0",
|
|
49
|
+
"@midscene/core": "1.9.8-beta-20260618014851.0"
|
|
55
50
|
},
|
|
56
51
|
"devDependencies": {
|
|
57
52
|
"@rslib/core": "^0.18.3",
|
package/static/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html><head><link rel="icon" href="/favicon.ico"><title>Midscene Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.7b1abe58.js"></script><script defer src="/static/js/905.8d12588e.js"></script><script defer src="/static/js/index.
|
|
1
|
+
<!doctype html><html><head><link rel="icon" href="/favicon.ico"><title>Midscene Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.7b1abe58.js"></script><script defer src="/static/js/905.8d12588e.js"></script><script defer src="/static/js/index.b4cb2178.js"></script><link href="/static/css/index.1293237f.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|