@kaeawc/auto-mobile 0.0.44 → 0.0.46
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/README.md +3 -3
- package/README.md.backup +3 -3
- package/dist/schemas/test-plan.schema.json +129 -6
- package/dist/schemas/tool-definitions.json +3469 -1609
- package/dist/src/db/migrations/2026_07_03_000_repair_datetime_now_defaults.ts +11 -2
- package/dist/src/db/migrations/2026_07_24_000_device_locks.ts +27 -0
- package/dist/src/db/migrations/2026_07_27_000_session_tool_capabilities.ts +17 -0
- package/dist/src/index.js +688 -421
- package/dist/src/index.js.map +1 -1
- package/package.json +29 -8
- package/schemas/test-plan.schema.json +129 -6
- package/schemas/tool-definitions.json +3469 -1609
package/package.json
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaeawc/auto-mobile",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46",
|
|
4
4
|
"description": "Mobile device interaction automation via MCP",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"test": "bun test",
|
|
7
|
-
"test:coverage": "bun test --coverage",
|
|
6
|
+
"test": "bun test --isolate",
|
|
7
|
+
"test:coverage": "bun test --isolate --coverage",
|
|
8
8
|
"test:startup:bun": "bash scripts/ci/mcp-startup-smoke.sh",
|
|
9
9
|
"test:image:bun": "bun scripts/ci/image-runtime-smoke.ts",
|
|
10
10
|
"test:image:sharp-bun-repro": "bash scripts/validate-sharp-bun-repro.sh",
|
|
11
11
|
"test:memory-leaks": "bun --expose-gc scripts/detect-memory-leaks.ts",
|
|
12
|
-
"
|
|
12
|
+
"test:integration:webrtc-mediamtx": "bash scripts/webrtc/run-mediamtx-publisher-integration.sh",
|
|
13
|
+
"test:integration:webrtc-device": "bash scripts/webrtc/run-mediamtx-device-integration.sh",
|
|
14
|
+
"lint": "eslint . --fix --pass-on-unpruned-suppressions && bun scripts/check-host-shell-boundary.ts && bash scripts/check-no-new-direct-simctl.sh && bun scripts/check-no-direct-plutil.ts && bash scripts/check-no-new-direct-xcodebuild.sh && bash scripts/check-no-new-direct-security.sh && bash scripts/check-no-new-direct-git-metadata.sh && bash scripts/check-no-local-shell-quote.sh && bash scripts/check-app-bundle-metadata-boundary.sh && bash scripts/check-ffmpeg-execution-boundary.sh && bash scripts/check-simulator-tcc-sqlite-boundary.sh && bash scripts/check-daemon-launcher-boundary.sh",
|
|
15
|
+
"lint:prune": "eslint . --prune-suppressions",
|
|
16
|
+
"lint:baseline": "eslint . --suppress-rule max-depth --suppress-rule complexity --suppress-rule max-nested-callbacks --suppress-rule auto-mobile/no-accumulator-foreach",
|
|
13
17
|
"typecheck": "bash scripts/typecheck-baseline.sh",
|
|
14
18
|
"typecheck:update": "bash scripts/typecheck-baseline.sh --update",
|
|
15
19
|
"watch": "bun --watch src/index.ts",
|
|
@@ -28,12 +32,26 @@
|
|
|
28
32
|
"profile:memory": "bun --expose-gc --inspect scripts/detect-memory-leaks.ts --mode=profile",
|
|
29
33
|
"profile:heap": "bun --expose-gc --heap-prof scripts/stress-test.ts",
|
|
30
34
|
"validate:yaml": "bun scripts/validate-yaml.ts",
|
|
35
|
+
"check:stdlib-first": "bash scripts/check-stdlib-first.sh",
|
|
36
|
+
"check:host-shell-boundary": "bun scripts/check-host-shell-boundary.ts",
|
|
37
|
+
"check:shell-quote-boundary": "bash scripts/check-no-local-shell-quote.sh",
|
|
38
|
+
"check:simctl-boundary": "bash scripts/check-no-new-direct-simctl.sh",
|
|
39
|
+
"check:plutil-boundary": "bun scripts/check-no-direct-plutil.ts",
|
|
40
|
+
"check:security-boundary": "bash scripts/check-no-new-direct-security.sh",
|
|
41
|
+
"check:git-metadata-boundary": "bash scripts/check-no-new-direct-git-metadata.sh",
|
|
42
|
+
"check:xcodebuild-boundary": "bash scripts/check-no-new-direct-xcodebuild.sh",
|
|
43
|
+
"check:android-emulator-boundary": "bash scripts/check-android-emulator-boundary.sh",
|
|
44
|
+
"check:app-bundle-metadata-boundary": "bash scripts/check-app-bundle-metadata-boundary.sh",
|
|
45
|
+
"check:ffmpeg-boundary": "bash scripts/check-ffmpeg-execution-boundary.sh",
|
|
46
|
+
"check:simulator-tcc-sqlite-boundary": "bash scripts/check-simulator-tcc-sqlite-boundary.sh",
|
|
47
|
+
"check:daemon-launcher-boundary": "bash scripts/check-daemon-launcher-boundary.sh",
|
|
48
|
+
"check:ios-ctrl-proxy-process-boundary": "bash scripts/check-ios-ctrl-proxy-process-boundary.sh",
|
|
31
49
|
"dead-code:ts": "bash scripts/detect-dead-code-ts.sh",
|
|
32
50
|
"dead-code:ts:prune": "bash -o pipefail -c 'bunx ts-prune --project tsconfig.dead-code.json -i src/db/migrations | (grep -v \"(used in module)\" || true) | bash scripts/filter-ts-prune-allowlist.sh'",
|
|
33
51
|
"dead-code:ts:knip": "bunx knip",
|
|
34
52
|
"prepublishOnly": "cp README.md README.md.backup && bun scripts/npm/transform-readme.js",
|
|
35
53
|
"postpublish": "mv README.md.backup README.md || true",
|
|
36
|
-
"turbo:validate": "turbo run lint build test",
|
|
54
|
+
"turbo:validate": "turbo run lint build test check:android-emulator-boundary check:ffmpeg-boundary check:host-shell-boundary check:ios-ctrl-proxy-process-boundary",
|
|
37
55
|
"turbo:build": "turbo run build",
|
|
38
56
|
"turbo:lint": "turbo run lint",
|
|
39
57
|
"turbo:test": "turbo run test"
|
|
@@ -79,11 +97,11 @@
|
|
|
79
97
|
"access": "public"
|
|
80
98
|
},
|
|
81
99
|
"dependencies": {
|
|
82
|
-
"@anthropic-ai/sdk": "^0.
|
|
100
|
+
"@anthropic-ai/sdk": "^0.115.0",
|
|
83
101
|
"@jimp/core": "^1.6.1",
|
|
84
102
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
85
|
-
"adm-zip": "^0.
|
|
86
|
-
"ajv": "
|
|
103
|
+
"adm-zip": "^0.6.0",
|
|
104
|
+
"ajv": "8.20.0",
|
|
87
105
|
"ajv-formats": "^3.0.1",
|
|
88
106
|
"async-mutex": "^0.5.0",
|
|
89
107
|
"jimp": "^1.6.0",
|
|
@@ -92,7 +110,9 @@
|
|
|
92
110
|
"kysely": "^0.29.0",
|
|
93
111
|
"pixelmatch": "^7.1.0",
|
|
94
112
|
"pngjs": "^7.0.0",
|
|
113
|
+
"reflect-metadata": "^0.2.2",
|
|
95
114
|
"sharp": "0.34.5",
|
|
115
|
+
"werift": "^0.24.0",
|
|
96
116
|
"ws": "^8.19.0",
|
|
97
117
|
"xml2js": "^0.6.2",
|
|
98
118
|
"zod": "^4.3.5"
|
|
@@ -154,6 +174,7 @@
|
|
|
154
174
|
"@typescript-eslint/parser": "^8.53.0",
|
|
155
175
|
"eslint": "^10.0.0",
|
|
156
176
|
"eslint-plugin-import": "^2.31.0",
|
|
177
|
+
"fast-check": "^4.9.0",
|
|
157
178
|
"knip": "^6.0.0",
|
|
158
179
|
"ts-prune": "^0.10.3",
|
|
159
180
|
"tsx": "^4.21.0",
|
|
@@ -453,11 +453,11 @@
|
|
|
453
453
|
"revoke",
|
|
454
454
|
"reset"
|
|
455
455
|
],
|
|
456
|
-
"description": "Permission action. Defaults to grant."
|
|
456
|
+
"description": "Permission action. Defaults to grant. Android reset requires permissions=['all'] and resets runtime permissions device-wide."
|
|
457
457
|
},
|
|
458
458
|
"permissions": {
|
|
459
459
|
"type": "array",
|
|
460
|
-
"description": "Runtime permissions or simulator privacy services to change;
|
|
460
|
+
"description": "Runtime permissions or simulator privacy services to change; Android reset accepts only 'all'; physical iOS accepts it too",
|
|
461
461
|
"minItems": 1,
|
|
462
462
|
"items": {
|
|
463
463
|
"type": "string",
|
|
@@ -467,7 +467,11 @@
|
|
|
467
467
|
"userId": {
|
|
468
468
|
"type": "integer",
|
|
469
469
|
"minimum": 0,
|
|
470
|
-
"description": "Android user
|
|
470
|
+
"description": "Android user ID for grant/revoke, not reset"
|
|
471
|
+
},
|
|
472
|
+
"notificationsEnabled": {
|
|
473
|
+
"type": "boolean",
|
|
474
|
+
"description": "Android notification state, independent of POST_NOTIFICATIONS"
|
|
471
475
|
},
|
|
472
476
|
"notificationPolicyAccess": {
|
|
473
477
|
"type": "boolean",
|
|
@@ -513,6 +517,12 @@
|
|
|
513
517
|
"permissions"
|
|
514
518
|
]
|
|
515
519
|
},
|
|
520
|
+
{
|
|
521
|
+
"required": [
|
|
522
|
+
"appId",
|
|
523
|
+
"notificationsEnabled"
|
|
524
|
+
]
|
|
525
|
+
},
|
|
516
526
|
{
|
|
517
527
|
"required": [
|
|
518
528
|
"appId",
|
|
@@ -530,6 +540,58 @@
|
|
|
530
540
|
"params"
|
|
531
541
|
]
|
|
532
542
|
}
|
|
543
|
+
],
|
|
544
|
+
"allOf": [
|
|
545
|
+
{
|
|
546
|
+
"if": {
|
|
547
|
+
"properties": {
|
|
548
|
+
"action": {
|
|
549
|
+
"const": "reset"
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
"required": [
|
|
553
|
+
"action"
|
|
554
|
+
]
|
|
555
|
+
},
|
|
556
|
+
"then": {
|
|
557
|
+
"required": [
|
|
558
|
+
"permissions"
|
|
559
|
+
],
|
|
560
|
+
"not": {
|
|
561
|
+
"required": [
|
|
562
|
+
"userId"
|
|
563
|
+
]
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"if": {
|
|
569
|
+
"properties": {
|
|
570
|
+
"action": {
|
|
571
|
+
"const": "reset"
|
|
572
|
+
},
|
|
573
|
+
"platform": {
|
|
574
|
+
"const": "android"
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
"required": [
|
|
578
|
+
"action",
|
|
579
|
+
"platform"
|
|
580
|
+
]
|
|
581
|
+
},
|
|
582
|
+
"then": {
|
|
583
|
+
"properties": {
|
|
584
|
+
"permissions": {
|
|
585
|
+
"type": "array",
|
|
586
|
+
"minItems": 1,
|
|
587
|
+
"maxItems": 1,
|
|
588
|
+
"items": {
|
|
589
|
+
"const": "all"
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
533
595
|
]
|
|
534
596
|
}
|
|
535
597
|
},
|
|
@@ -1173,7 +1235,7 @@
|
|
|
1173
1235
|
"revoke",
|
|
1174
1236
|
"reset"
|
|
1175
1237
|
],
|
|
1176
|
-
"description": "Permission action. Defaults to grant."
|
|
1238
|
+
"description": "Permission action. Defaults to grant. Android reset requires permissions=['all'] and resets runtime permissions device-wide."
|
|
1177
1239
|
},
|
|
1178
1240
|
"permissions": {
|
|
1179
1241
|
"type": "array",
|
|
@@ -1182,12 +1244,16 @@
|
|
|
1182
1244
|
"type": "string",
|
|
1183
1245
|
"minLength": 1
|
|
1184
1246
|
},
|
|
1185
|
-
"description": "Runtime permissions or simulator privacy services to change;
|
|
1247
|
+
"description": "Runtime permissions or simulator privacy services to change; Android reset accepts only 'all'; physical iOS accepts it too"
|
|
1186
1248
|
},
|
|
1187
1249
|
"userId": {
|
|
1188
1250
|
"type": "integer",
|
|
1189
1251
|
"minimum": 0,
|
|
1190
|
-
"description": "Android user
|
|
1252
|
+
"description": "Android user ID for grant/revoke, not reset"
|
|
1253
|
+
},
|
|
1254
|
+
"notificationsEnabled": {
|
|
1255
|
+
"type": "boolean",
|
|
1256
|
+
"description": "Android notification state, independent of POST_NOTIFICATIONS"
|
|
1191
1257
|
},
|
|
1192
1258
|
"notificationPolicyAccess": {
|
|
1193
1259
|
"type": "boolean",
|
|
@@ -1227,6 +1293,11 @@
|
|
|
1227
1293
|
}
|
|
1228
1294
|
},
|
|
1229
1295
|
"anyOf": [
|
|
1296
|
+
{
|
|
1297
|
+
"required": [
|
|
1298
|
+
"notificationsEnabled"
|
|
1299
|
+
]
|
|
1300
|
+
},
|
|
1230
1301
|
{
|
|
1231
1302
|
"required": [
|
|
1232
1303
|
"permissions"
|
|
@@ -1243,6 +1314,58 @@
|
|
|
1243
1314
|
]
|
|
1244
1315
|
}
|
|
1245
1316
|
],
|
|
1317
|
+
"allOf": [
|
|
1318
|
+
{
|
|
1319
|
+
"if": {
|
|
1320
|
+
"properties": {
|
|
1321
|
+
"action": {
|
|
1322
|
+
"const": "reset"
|
|
1323
|
+
}
|
|
1324
|
+
},
|
|
1325
|
+
"required": [
|
|
1326
|
+
"action"
|
|
1327
|
+
]
|
|
1328
|
+
},
|
|
1329
|
+
"then": {
|
|
1330
|
+
"required": [
|
|
1331
|
+
"permissions"
|
|
1332
|
+
],
|
|
1333
|
+
"not": {
|
|
1334
|
+
"required": [
|
|
1335
|
+
"userId"
|
|
1336
|
+
]
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
"if": {
|
|
1342
|
+
"properties": {
|
|
1343
|
+
"action": {
|
|
1344
|
+
"const": "reset"
|
|
1345
|
+
},
|
|
1346
|
+
"platform": {
|
|
1347
|
+
"const": "android"
|
|
1348
|
+
}
|
|
1349
|
+
},
|
|
1350
|
+
"required": [
|
|
1351
|
+
"action",
|
|
1352
|
+
"platform"
|
|
1353
|
+
]
|
|
1354
|
+
},
|
|
1355
|
+
"then": {
|
|
1356
|
+
"properties": {
|
|
1357
|
+
"permissions": {
|
|
1358
|
+
"type": "array",
|
|
1359
|
+
"minItems": 1,
|
|
1360
|
+
"maxItems": 1,
|
|
1361
|
+
"items": {
|
|
1362
|
+
"const": "all"
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
],
|
|
1246
1369
|
"description": "Parameters for setAppPermissions"
|
|
1247
1370
|
},
|
|
1248
1371
|
"getAppPermissionsParams": {
|