@midscene/ios 1.9.8-beta-20260618091332.0 → 1.10.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 CHANGED
@@ -1,8 +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 { agentBehaviorInitArgShape, getAgentInitArgsSignature, shouldRebuildAgentForInitArgs } from "@midscene/shared/mcp/agent-behavior-init-args";
5
- import { BaseMidsceneTools } from "@midscene/shared/mcp/base-tools";
6
6
  import { Agent } from "@midscene/core/agent";
7
7
  import { MIDSCENE_IOS_DEVICE_CLASS_OVERRIDE } from "@midscene/shared/env";
8
8
  import { mergeAndNormalizeAppNameMapping, normalizeForComparison } from "@midscene/shared/utils";
@@ -1340,7 +1340,7 @@ async function agentFromWebDriverAgent(opts) {
1340
1340
  await device.connect();
1341
1341
  return new IOSAgent(device, opts);
1342
1342
  }
1343
- function mcp_tools_define_property(obj, key, value) {
1343
+ function agent_tools_define_property(obj, key, value) {
1344
1344
  if (key in obj) Object.defineProperty(obj, key, {
1345
1345
  value: value,
1346
1346
  enumerable: true,
@@ -1350,7 +1350,7 @@ function mcp_tools_define_property(obj, key, value) {
1350
1350
  else obj[key] = value;
1351
1351
  return obj;
1352
1352
  }
1353
- const debug = getDebug('mcp:ios-tools');
1353
+ const debug = getDebug('agent-tools:ios');
1354
1354
  const iosInitArgShape = {
1355
1355
  deviceId: z.string().optional().describe('iOS device UDID (optional when WDA auto-detect is sufficient)'),
1356
1356
  wdaHost: z.string().optional().describe('WebDriverAgent host, defaults to localhost'),
@@ -1442,20 +1442,20 @@ class IOSMidsceneTools extends BaseMidsceneTools {
1442
1442
  ];
1443
1443
  }
1444
1444
  constructor(...args){
1445
- super(...args), mcp_tools_define_property(this, "initArgSpec", {
1445
+ super(...args), agent_tools_define_property(this, "initArgSpec", {
1446
1446
  namespace: 'ios',
1447
1447
  shape: iosInitArgShape,
1448
1448
  cli: {
1449
1449
  preferBareKeys: true
1450
1450
  },
1451
1451
  adapt: (extracted)=>extracted
1452
- }), mcp_tools_define_property(this, "lastOptsSignature", void 0);
1452
+ }), agent_tools_define_property(this, "lastOptsSignature", void 0);
1453
1453
  }
1454
1454
  }
1455
1455
  const tools = new IOSMidsceneTools();
1456
1456
  runToolsCLI(tools, 'midscene-ios', {
1457
1457
  stripPrefix: 'ios_',
1458
- version: "1.9.8-beta-20260618091332.0",
1458
+ version: "1.10.0",
1459
1459
  extraCommands: createReportCliCommands()
1460
1460
  }).catch((e)=>{
1461
1461
  process.exit(reportCLIError(e));
package/dist/es/index.mjs CHANGED
@@ -9,8 +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 { agentBehaviorInitArgShape, getAgentInitArgsSignature, shouldRebuildAgentForInitArgs } from "@midscene/shared/mcp/agent-behavior-init-args";
13
- import { BaseMidsceneTools } from "@midscene/shared/mcp/base-tools";
12
+ import { agentBehaviorInitArgShape, getAgentInitArgsSignature, shouldRebuildAgentForInitArgs } from "@midscene/shared/agent-tools/agent-behavior-init-args";
13
+ import { BaseMidsceneTools } from "@midscene/shared/agent-tools/base-tools";
14
14
  import { exec } from "node:child_process";
15
15
  import { platform } from "node:os";
16
16
  import { promisify } from "node:util";
@@ -1345,7 +1345,7 @@ async function agentFromWebDriverAgent(opts) {
1345
1345
  await device.connect();
1346
1346
  return new IOSAgent(device, opts);
1347
1347
  }
1348
- function mcp_tools_define_property(obj, key, value) {
1348
+ function agent_tools_define_property(obj, key, value) {
1349
1349
  if (key in obj) Object.defineProperty(obj, key, {
1350
1350
  value: value,
1351
1351
  enumerable: true,
@@ -1355,7 +1355,7 @@ function mcp_tools_define_property(obj, key, value) {
1355
1355
  else obj[key] = value;
1356
1356
  return obj;
1357
1357
  }
1358
- const debug = getDebug('mcp:ios-tools');
1358
+ const debug = getDebug('agent-tools:ios');
1359
1359
  const iosInitArgShape = {
1360
1360
  deviceId: z.string().optional().describe('iOS device UDID (optional when WDA auto-detect is sufficient)'),
1361
1361
  wdaHost: z.string().optional().describe('WebDriverAgent host, defaults to localhost'),
@@ -1447,14 +1447,14 @@ class IOSMidsceneTools extends BaseMidsceneTools {
1447
1447
  ];
1448
1448
  }
1449
1449
  constructor(...args){
1450
- super(...args), mcp_tools_define_property(this, "initArgSpec", {
1450
+ super(...args), agent_tools_define_property(this, "initArgSpec", {
1451
1451
  namespace: 'ios',
1452
1452
  shape: iosInitArgShape,
1453
1453
  cli: {
1454
1454
  preferBareKeys: true
1455
1455
  },
1456
1456
  adapt: (extracted)=>extracted
1457
- }), mcp_tools_define_property(this, "lastOptsSignature", void 0);
1457
+ }), agent_tools_define_property(this, "lastOptsSignature", void 0);
1458
1458
  }
1459
1459
  }
1460
1460
  const execAsync = promisify(exec);
package/dist/lib/cli.js CHANGED
@@ -23,9 +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 agent_behavior_init_args_namespaceObject = require("@midscene/shared/mcp/agent-behavior-init-args");
28
- const base_tools_namespaceObject = require("@midscene/shared/mcp/base-tools");
29
29
  const agent_namespaceObject = require("@midscene/core/agent");
30
30
  const env_namespaceObject = require("@midscene/shared/env");
31
31
  const utils_namespaceObject = require("@midscene/shared/utils");
@@ -1364,7 +1364,7 @@ async function agentFromWebDriverAgent(opts) {
1364
1364
  await device.connect();
1365
1365
  return new IOSAgent(device, opts);
1366
1366
  }
1367
- function mcp_tools_define_property(obj, key, value) {
1367
+ function agent_tools_define_property(obj, key, value) {
1368
1368
  if (key in obj) Object.defineProperty(obj, key, {
1369
1369
  value: value,
1370
1370
  enumerable: true,
@@ -1374,7 +1374,7 @@ function mcp_tools_define_property(obj, key, value) {
1374
1374
  else obj[key] = value;
1375
1375
  return obj;
1376
1376
  }
1377
- const debug = (0, logger_namespaceObject.getDebug)('mcp:ios-tools');
1377
+ const debug = (0, logger_namespaceObject.getDebug)('agent-tools:ios');
1378
1378
  const iosInitArgShape = {
1379
1379
  deviceId: core_namespaceObject.z.string().optional().describe('iOS device UDID (optional when WDA auto-detect is sufficient)'),
1380
1380
  wdaHost: core_namespaceObject.z.string().optional().describe('WebDriverAgent host, defaults to localhost'),
@@ -1466,20 +1466,20 @@ class IOSMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools {
1466
1466
  ];
1467
1467
  }
1468
1468
  constructor(...args){
1469
- super(...args), mcp_tools_define_property(this, "initArgSpec", {
1469
+ super(...args), agent_tools_define_property(this, "initArgSpec", {
1470
1470
  namespace: 'ios',
1471
1471
  shape: iosInitArgShape,
1472
1472
  cli: {
1473
1473
  preferBareKeys: true
1474
1474
  },
1475
1475
  adapt: (extracted)=>extracted
1476
- }), mcp_tools_define_property(this, "lastOptsSignature", void 0);
1476
+ }), agent_tools_define_property(this, "lastOptsSignature", void 0);
1477
1477
  }
1478
1478
  }
1479
1479
  const tools = new IOSMidsceneTools();
1480
1480
  (0, cli_namespaceObject.runToolsCLI)(tools, 'midscene-ios', {
1481
1481
  stripPrefix: 'ios_',
1482
- version: "1.9.8-beta-20260618091332.0",
1482
+ version: "1.10.0",
1483
1483
  extraCommands: (0, core_namespaceObject.createReportCliCommands)()
1484
1484
  }).catch((e)=>{
1485
1485
  process.exit((0, cli_namespaceObject.reportCLIError)(e));
package/dist/lib/index.js CHANGED
@@ -1382,9 +1382,9 @@ async function agentFromWebDriverAgent(opts) {
1382
1382
  await device.connect();
1383
1383
  return new IOSAgent(device, opts);
1384
1384
  }
1385
- const agent_behavior_init_args_namespaceObject = require("@midscene/shared/mcp/agent-behavior-init-args");
1386
- const base_tools_namespaceObject = require("@midscene/shared/mcp/base-tools");
1387
- function mcp_tools_define_property(obj, key, value) {
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) {
1388
1388
  if (key in obj) Object.defineProperty(obj, key, {
1389
1389
  value: value,
1390
1390
  enumerable: true,
@@ -1394,7 +1394,7 @@ function mcp_tools_define_property(obj, key, value) {
1394
1394
  else obj[key] = value;
1395
1395
  return obj;
1396
1396
  }
1397
- const debug = (0, logger_namespaceObject.getDebug)('mcp:ios-tools');
1397
+ const debug = (0, logger_namespaceObject.getDebug)('agent-tools:ios');
1398
1398
  const iosInitArgShape = {
1399
1399
  deviceId: core_namespaceObject.z.string().optional().describe('iOS device UDID (optional when WDA auto-detect is sufficient)'),
1400
1400
  wdaHost: core_namespaceObject.z.string().optional().describe('WebDriverAgent host, defaults to localhost'),
@@ -1486,14 +1486,14 @@ class IOSMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools {
1486
1486
  ];
1487
1487
  }
1488
1488
  constructor(...args){
1489
- super(...args), mcp_tools_define_property(this, "initArgSpec", {
1489
+ super(...args), agent_tools_define_property(this, "initArgSpec", {
1490
1490
  namespace: 'ios',
1491
1491
  shape: iosInitArgShape,
1492
1492
  cli: {
1493
1493
  preferBareKeys: true
1494
1494
  },
1495
1495
  adapt: (extracted)=>extracted
1496
- }), mcp_tools_define_property(this, "lastOptsSignature", void 0);
1496
+ }), agent_tools_define_property(this, "lastOptsSignature", void 0);
1497
1497
  }
1498
1498
  }
1499
1499
  const external_node_child_process_namespaceObject = require("node:child_process");
@@ -2,12 +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/mcp/agent-behavior-init-args';
5
+ import { AgentBehaviorInitArgs } from '@midscene/shared/agent-tools/agent-behavior-init-args';
6
6
  import { AgentOpt } from '@midscene/core/agent';
7
- import { BaseMidsceneTools } from '@midscene/shared/mcp/base-tools';
7
+ import { BaseMidsceneTools } from '@midscene/shared/agent-tools/base-tools';
8
8
  import { DeviceAction } from '@midscene/core';
9
9
  import type { ElementInfo } from '@midscene/shared/extractor';
10
- import { InitArgSpec } from '@midscene/shared/mcp/base-tools';
10
+ import { InitArgSpec } from '@midscene/shared/agent-tools/base-tools';
11
11
  import { InterfaceType } from '@midscene/core';
12
12
  import { IOSDeviceOpt } from '@midscene/core/device';
13
13
  import { MobileInputPrimitives } from '@midscene/core/device';
@@ -15,7 +15,7 @@ import { overrideAIConfig } from '@midscene/shared/env';
15
15
  import { PlaygroundPlatformDescriptor } from '@midscene/playground';
16
16
  import { Point } from '@midscene/core';
17
17
  import { Size } from '@midscene/core';
18
- import type { ToolDefinition } from '@midscene/shared/mcp/types';
18
+ import type { ToolDefinition } from '@midscene/shared/agent-tools/types';
19
19
  import { WebDriverClient } from '@midscene/webdriver';
20
20
  import { z } from '@midscene/core';
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/ios",
3
- "version": "1.9.8-beta-20260618091332.0",
3
+ "version": "1.10.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/core": "1.9.8-beta-20260618091332.0",
52
- "@midscene/webdriver": "1.9.8-beta-20260618091332.0",
53
- "@midscene/playground": "1.9.8-beta-20260618091332.0",
54
- "@midscene/shared": "1.9.8-beta-20260618091332.0"
46
+ "@midscene/webdriver": "1.10.0",
47
+ "@midscene/shared": "1.10.0",
48
+ "@midscene/core": "1.10.0",
49
+ "@midscene/playground": "1.10.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.64bb287d.js"></script><link href="/static/css/index.1293237f.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
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.9c67d55f.js"></script><link href="/static/css/index.1293237f.css" rel="stylesheet"></head><body><div id="root"></div></body></html>