@roxybrowser/openapi 1.0.14-beta.0 → 1.0.14
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/lib/cli.cjs +325 -128
- package/lib/cli.cjs.map +1 -1
- package/lib/cli.js +325 -128
- package/lib/cli.js.map +1 -1
- package/lib/index.cjs +324 -127
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +10 -186
- package/lib/index.d.ts +10 -186
- package/lib/index.js +324 -127
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1193,24 +1193,139 @@ var osversion_windows = [
|
|
|
1193
1193
|
];
|
|
1194
1194
|
var osversion_macos = [
|
|
1195
1195
|
{
|
|
1196
|
-
label: "
|
|
1196
|
+
label: "15.3.2",
|
|
1197
1197
|
type: "osVersion-macOS",
|
|
1198
|
-
value: "
|
|
1198
|
+
value: "15.3.2"
|
|
1199
1199
|
},
|
|
1200
1200
|
{
|
|
1201
|
-
label: "15",
|
|
1201
|
+
label: "15.3.1",
|
|
1202
1202
|
type: "osVersion-macOS",
|
|
1203
|
-
value: "15"
|
|
1203
|
+
value: "15.3.1"
|
|
1204
1204
|
},
|
|
1205
1205
|
{
|
|
1206
|
-
label: "
|
|
1206
|
+
label: "15.3",
|
|
1207
1207
|
type: "osVersion-macOS",
|
|
1208
|
-
value: "
|
|
1208
|
+
value: "15.3"
|
|
1209
1209
|
},
|
|
1210
1210
|
{
|
|
1211
|
-
label: "
|
|
1211
|
+
label: "15.2",
|
|
1212
1212
|
type: "osVersion-macOS",
|
|
1213
|
-
value: "
|
|
1213
|
+
value: "15.2"
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
label: "15.1",
|
|
1217
|
+
type: "osVersion-macOS",
|
|
1218
|
+
value: "15.1"
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
label: "15.0.1",
|
|
1222
|
+
type: "osVersion-macOS",
|
|
1223
|
+
value: "15.0.1"
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
label: "15.0",
|
|
1227
|
+
type: "osVersion-macOS",
|
|
1228
|
+
value: "15.0"
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
label: "14.7.4",
|
|
1232
|
+
type: "osVersion-macOS",
|
|
1233
|
+
value: "14.7.4"
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
label: "14.7.3",
|
|
1237
|
+
type: "osVersion-macOS",
|
|
1238
|
+
value: "14.7.3"
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
label: "14.7.2",
|
|
1242
|
+
type: "osVersion-macOS",
|
|
1243
|
+
value: "14.7.2"
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
label: "14.7.1",
|
|
1247
|
+
type: "osVersion-macOS",
|
|
1248
|
+
value: "14.7.1"
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
label: "14.7",
|
|
1252
|
+
type: "osVersion-macOS",
|
|
1253
|
+
value: "14.7"
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
label: "14.6.1",
|
|
1257
|
+
type: "osVersion-macOS",
|
|
1258
|
+
value: "14.6.1"
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
label: "14.6",
|
|
1262
|
+
type: "osVersion-macOS",
|
|
1263
|
+
value: "14.6"
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
label: "14.5",
|
|
1267
|
+
type: "osVersion-macOS",
|
|
1268
|
+
value: "14.5"
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
label: "14.4.1",
|
|
1272
|
+
type: "osVersion-macOS",
|
|
1273
|
+
value: "14.4.1"
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
label: "14.4",
|
|
1277
|
+
type: "osVersion-macOS",
|
|
1278
|
+
value: "14.4"
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
label: "14.3.1",
|
|
1282
|
+
type: "osVersion-macOS",
|
|
1283
|
+
value: "14.3.1"
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
label: "14.3",
|
|
1287
|
+
type: "osVersion-macOS",
|
|
1288
|
+
value: "14.3"
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
label: "14.2.1",
|
|
1292
|
+
type: "osVersion-macOS",
|
|
1293
|
+
value: "14.2.1"
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
label: "14.2",
|
|
1297
|
+
type: "osVersion-macOS",
|
|
1298
|
+
value: "14.2"
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
label: "14.1",
|
|
1302
|
+
type: "osVersion-macOS",
|
|
1303
|
+
value: "14.1"
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
label: "13.7.4",
|
|
1307
|
+
type: "osVersion-macOS",
|
|
1308
|
+
value: "13.7.4"
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
label: "13.7.3",
|
|
1312
|
+
type: "osVersion-macOS",
|
|
1313
|
+
value: "13.7.3"
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
label: "13.7.2",
|
|
1317
|
+
type: "osVersion-macOS",
|
|
1318
|
+
value: "13.7.2"
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
label: "13.7.1",
|
|
1322
|
+
type: "osVersion-macOS",
|
|
1323
|
+
value: "13.7.1"
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
label: "13.7",
|
|
1327
|
+
type: "osVersion-macOS",
|
|
1328
|
+
value: "13.7"
|
|
1214
1329
|
},
|
|
1215
1330
|
{
|
|
1216
1331
|
label: "ALL",
|
|
@@ -1226,11 +1341,6 @@ var osversion_linux = [
|
|
|
1226
1341
|
}
|
|
1227
1342
|
];
|
|
1228
1343
|
var osversion_android = [
|
|
1229
|
-
{
|
|
1230
|
-
label: "16",
|
|
1231
|
-
type: "osVersion-Android",
|
|
1232
|
-
value: "16"
|
|
1233
|
-
},
|
|
1234
1344
|
{
|
|
1235
1345
|
label: "15",
|
|
1236
1346
|
type: "osVersion-Android",
|
|
@@ -1269,64 +1379,221 @@ var osversion_android = [
|
|
|
1269
1379
|
];
|
|
1270
1380
|
var osversion_ios = [
|
|
1271
1381
|
{
|
|
1272
|
-
label: "
|
|
1382
|
+
label: "18.2",
|
|
1273
1383
|
type: "osVersion-IOS",
|
|
1274
|
-
value: "
|
|
1384
|
+
value: "18.2"
|
|
1275
1385
|
},
|
|
1276
1386
|
{
|
|
1277
|
-
label: "18",
|
|
1387
|
+
label: "18.1",
|
|
1278
1388
|
type: "osVersion-IOS",
|
|
1279
|
-
value: "18"
|
|
1389
|
+
value: "18.1"
|
|
1280
1390
|
},
|
|
1281
1391
|
{
|
|
1282
|
-
label: "
|
|
1392
|
+
label: "18.0",
|
|
1283
1393
|
type: "osVersion-IOS",
|
|
1284
|
-
value: "
|
|
1394
|
+
value: "18.0"
|
|
1285
1395
|
},
|
|
1286
1396
|
{
|
|
1287
|
-
label: "
|
|
1397
|
+
label: "17.0",
|
|
1288
1398
|
type: "osVersion-IOS",
|
|
1289
|
-
value: "
|
|
1399
|
+
value: "17.0"
|
|
1290
1400
|
},
|
|
1291
1401
|
{
|
|
1292
|
-
label: "
|
|
1402
|
+
label: "16.6",
|
|
1293
1403
|
type: "osVersion-IOS",
|
|
1294
|
-
value: "
|
|
1404
|
+
value: "16.6"
|
|
1295
1405
|
},
|
|
1296
1406
|
{
|
|
1297
|
-
label: "
|
|
1407
|
+
label: "16.5",
|
|
1298
1408
|
type: "osVersion-IOS",
|
|
1299
|
-
value: "
|
|
1409
|
+
value: "16.5"
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
label: "16.4",
|
|
1413
|
+
type: "osVersion-IOS",
|
|
1414
|
+
value: "16.4"
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
label: "16.3",
|
|
1418
|
+
type: "osVersion-IOS",
|
|
1419
|
+
value: "16.3"
|
|
1420
|
+
},
|
|
1421
|
+
{
|
|
1422
|
+
label: "16.2",
|
|
1423
|
+
type: "osVersion-IOS",
|
|
1424
|
+
value: "16.2"
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
label: "16.1",
|
|
1428
|
+
type: "osVersion-IOS",
|
|
1429
|
+
value: "16.1"
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
label: "16.0",
|
|
1433
|
+
type: "osVersion-IOS",
|
|
1434
|
+
value: "16.0"
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
label: "15.7",
|
|
1438
|
+
type: "osVersion-IOS",
|
|
1439
|
+
value: "15.7"
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
label: "15.6",
|
|
1443
|
+
type: "osVersion-IOS",
|
|
1444
|
+
value: "15.6"
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
label: "15.5",
|
|
1448
|
+
type: "osVersion-IOS",
|
|
1449
|
+
value: "15.5"
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
label: "15.4",
|
|
1453
|
+
type: "osVersion-IOS",
|
|
1454
|
+
value: "15.4"
|
|
1455
|
+
},
|
|
1456
|
+
{
|
|
1457
|
+
label: "15.3",
|
|
1458
|
+
type: "osVersion-IOS",
|
|
1459
|
+
value: "15.3"
|
|
1460
|
+
},
|
|
1461
|
+
{
|
|
1462
|
+
label: "15.2",
|
|
1463
|
+
type: "osVersion-IOS",
|
|
1464
|
+
value: "15.2"
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
label: "15.1",
|
|
1468
|
+
type: "osVersion-IOS",
|
|
1469
|
+
value: "15.1"
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
label: "15.0",
|
|
1473
|
+
type: "osVersion-IOS",
|
|
1474
|
+
value: "15.0"
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
label: "14.7",
|
|
1478
|
+
type: "osVersion-IOS",
|
|
1479
|
+
value: "14.7"
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
label: "14.6",
|
|
1483
|
+
type: "osVersion-IOS",
|
|
1484
|
+
value: "14.6"
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
label: "14.5",
|
|
1488
|
+
type: "osVersion-IOS",
|
|
1489
|
+
value: "14.5"
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
label: "14.4",
|
|
1493
|
+
type: "osVersion-IOS",
|
|
1494
|
+
value: "14.4"
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
label: "14.3",
|
|
1498
|
+
type: "osVersion-IOS",
|
|
1499
|
+
value: "14.3"
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
label: "14.2",
|
|
1503
|
+
type: "osVersion-IOS",
|
|
1504
|
+
value: "14.2"
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
label: "14.1",
|
|
1508
|
+
type: "osVersion-IOS",
|
|
1509
|
+
value: "14.1"
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
label: "14.0",
|
|
1513
|
+
type: "osVersion-IOS",
|
|
1514
|
+
value: "14.0"
|
|
1300
1515
|
}
|
|
1301
1516
|
];
|
|
1302
|
-
var
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1517
|
+
var coreVersion = [
|
|
1518
|
+
{
|
|
1519
|
+
label: "RoxyChrome 144",
|
|
1520
|
+
type: "coreVersion",
|
|
1521
|
+
value: "144"
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
label: "RoxyChrome 143",
|
|
1525
|
+
type: "coreVersion",
|
|
1526
|
+
value: "143"
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
label: "RoxyChrome 142",
|
|
1530
|
+
type: "coreVersion",
|
|
1531
|
+
value: "142"
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
label: "RoxyChrome 141",
|
|
1535
|
+
type: "coreVersion",
|
|
1536
|
+
value: "141"
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
label: "RoxyChrome 140",
|
|
1540
|
+
type: "coreVersion",
|
|
1541
|
+
value: "140"
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
label: "RoxyChrome 139",
|
|
1545
|
+
type: "coreVersion",
|
|
1546
|
+
value: "139"
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
label: "RoxyChrome 138",
|
|
1550
|
+
type: "coreVersion",
|
|
1551
|
+
value: "138"
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
label: "RoxyChrome 137",
|
|
1555
|
+
type: "coreVersion",
|
|
1556
|
+
value: "137"
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
label: "RoxyChrome 136",
|
|
1560
|
+
type: "coreVersion",
|
|
1561
|
+
value: "136"
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
label: "RoxyChrome 135",
|
|
1565
|
+
type: "coreVersion",
|
|
1566
|
+
value: "135"
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
label: "RoxyChrome 133",
|
|
1570
|
+
type: "coreVersion",
|
|
1571
|
+
value: "133"
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
label: "RoxyChrome 130",
|
|
1575
|
+
type: "coreVersion",
|
|
1576
|
+
value: "130"
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
label: "RoxyChrome 125",
|
|
1580
|
+
type: "coreVersion",
|
|
1581
|
+
value: "125"
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
label: "RoxyChrome 117",
|
|
1585
|
+
type: "coreVersion",
|
|
1586
|
+
value: "117"
|
|
1587
|
+
},
|
|
1588
|
+
{
|
|
1589
|
+
label: "RoxyChrome 109",
|
|
1590
|
+
type: "coreVersion",
|
|
1591
|
+
value: "109"
|
|
1592
|
+
}
|
|
1314
1593
|
];
|
|
1315
1594
|
function osVersionString() {
|
|
1316
1595
|
return `Windows: ${osversion_windows.map((item) => item.value).join(",")}; macOS: ${osversion_macos.map((item) => item.value).join(",")}; Linux: ${osversion_linux.map((item) => item.value).join(",")}; Android: ${osversion_android.map((item) => item.value).join(",")}; IOS: ${osversion_ios.map((item) => item.value).join(",")}`;
|
|
1317
1596
|
}
|
|
1318
|
-
function validateBrowserConfig(params) {
|
|
1319
|
-
const os = params.os || "Windows";
|
|
1320
|
-
const browserCore2 = params.browserCore;
|
|
1321
|
-
if (!browserCore2) return null;
|
|
1322
|
-
const [coreType] = browserCore2.split(" ");
|
|
1323
|
-
if (coreType === "Firefox" && os === "macOS") {
|
|
1324
|
-
if (params.osVersion && params.osVersion !== "ALL") {
|
|
1325
|
-
return `Firefox on macOS only supports osVersion "ALL", but got "${params.osVersion}".`;
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
return null;
|
|
1329
|
-
}
|
|
1330
1597
|
var CreateBrowser = class {
|
|
1331
1598
|
name = "roxy_create_browser";
|
|
1332
1599
|
description = "Create a browser with complete configuration control - for expert users needing full parameter access";
|
|
@@ -1341,15 +1608,10 @@ var CreateBrowser = class {
|
|
|
1341
1608
|
type: "string",
|
|
1342
1609
|
description: "Browser window name"
|
|
1343
1610
|
},
|
|
1344
|
-
|
|
1611
|
+
coreVersion: {
|
|
1345
1612
|
type: "string",
|
|
1346
|
-
enum:
|
|
1347
|
-
description: "Browser core version.
|
|
1348
|
-
},
|
|
1349
|
-
useLatestCore: {
|
|
1350
|
-
type: "number",
|
|
1351
|
-
enum: [0, 1],
|
|
1352
|
-
description: "Whether to always use the latest core version: 1=yes, 0=no (default: 0). When set to 1, coreVersion will be automatically kept up-to-date."
|
|
1613
|
+
enum: coreVersion.map((item) => item.value),
|
|
1614
|
+
description: "Browser core version. If not provided, the latest available core version will be used."
|
|
1353
1615
|
},
|
|
1354
1616
|
os: {
|
|
1355
1617
|
type: "string",
|
|
@@ -1358,7 +1620,7 @@ var CreateBrowser = class {
|
|
|
1358
1620
|
},
|
|
1359
1621
|
osVersion: {
|
|
1360
1622
|
type: "string",
|
|
1361
|
-
description: osVersionString()
|
|
1623
|
+
description: osVersionString()
|
|
1362
1624
|
},
|
|
1363
1625
|
userAgent: {
|
|
1364
1626
|
type: "string",
|
|
@@ -1509,24 +1771,7 @@ var CreateBrowser = class {
|
|
|
1509
1771
|
}
|
|
1510
1772
|
}
|
|
1511
1773
|
},
|
|
1512
|
-
required: ["workspaceId"
|
|
1513
|
-
allOf: [
|
|
1514
|
-
{
|
|
1515
|
-
// Firefox on macOS only supports osVersion "ALL"
|
|
1516
|
-
if: {
|
|
1517
|
-
properties: {
|
|
1518
|
-
browserCore: { pattern: "^Firefox" },
|
|
1519
|
-
os: { const: "macOS" }
|
|
1520
|
-
},
|
|
1521
|
-
required: ["browserCore", "os"]
|
|
1522
|
-
},
|
|
1523
|
-
then: {
|
|
1524
|
-
properties: {
|
|
1525
|
-
osVersion: { enum: ["ALL"] }
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
]
|
|
1774
|
+
required: ["workspaceId"]
|
|
1530
1775
|
};
|
|
1531
1776
|
get schema() {
|
|
1532
1777
|
return {
|
|
@@ -1536,22 +1781,6 @@ var CreateBrowser = class {
|
|
|
1536
1781
|
};
|
|
1537
1782
|
}
|
|
1538
1783
|
async handle(params) {
|
|
1539
|
-
const validationError = validateBrowserConfig(params);
|
|
1540
|
-
if (validationError) {
|
|
1541
|
-
return {
|
|
1542
|
-
content: [{ type: "text", text: `\u274C **Invalid configuration:**
|
|
1543
|
-
|
|
1544
|
-
${validationError}` }]
|
|
1545
|
-
};
|
|
1546
|
-
}
|
|
1547
|
-
if (params.browserCore) {
|
|
1548
|
-
const [coreType, coreVersion] = params.browserCore.split(" ");
|
|
1549
|
-
params.coreType = coreType || "Chrome";
|
|
1550
|
-
params.coreVersion = coreVersion;
|
|
1551
|
-
delete params.browserCore;
|
|
1552
|
-
} else {
|
|
1553
|
-
params.coreType = "Chrome";
|
|
1554
|
-
}
|
|
1555
1784
|
const result = await request("/browser/create", {
|
|
1556
1785
|
method: "POST",
|
|
1557
1786
|
body: JSON.stringify(params)
|
|
@@ -1566,7 +1795,6 @@ ${validationError}` }]
|
|
|
1566
1795
|
text = `\u2705 **Simple Browser Created**
|
|
1567
1796
|
|
|
1568
1797
|
**Browser ID:** \`${data.dirId}\`
|
|
1569
|
-
**Core Type:** ${data.coreType || "Chrome"}
|
|
1570
1798
|
*Use this browser ID with \`roxy_open_browsers\` to start the browser and get CDP endpoints for automation.*`;
|
|
1571
1799
|
}
|
|
1572
1800
|
return {
|
|
@@ -1592,8 +1820,7 @@ var BatchCreateBrowsers = class {
|
|
|
1592
1820
|
items: {
|
|
1593
1821
|
type: "object",
|
|
1594
1822
|
properties: createBrowser.inputSchema.properties,
|
|
1595
|
-
required: ["workspaceId"
|
|
1596
|
-
allOf: createBrowser.inputSchema.allOf
|
|
1823
|
+
required: ["workspaceId"]
|
|
1597
1824
|
}
|
|
1598
1825
|
}
|
|
1599
1826
|
},
|
|
@@ -1620,14 +1847,6 @@ var BatchCreateBrowsers = class {
|
|
|
1620
1847
|
const results = [];
|
|
1621
1848
|
const createPromises = params.browsers.map(async (browserParams, index) => {
|
|
1622
1849
|
try {
|
|
1623
|
-
const validationError = validateBrowserConfig(browserParams);
|
|
1624
|
-
if (validationError) {
|
|
1625
|
-
return {
|
|
1626
|
-
index,
|
|
1627
|
-
success: false,
|
|
1628
|
-
error: validationError
|
|
1629
|
-
};
|
|
1630
|
-
}
|
|
1631
1850
|
const result = await request("/browser/create", {
|
|
1632
1851
|
method: "POST",
|
|
1633
1852
|
body: JSON.stringify(browserParams)
|
|
@@ -1693,8 +1912,7 @@ var UpdateBrowser = class {
|
|
|
1693
1912
|
properties: {
|
|
1694
1913
|
...createBrowser.inputSchema.properties
|
|
1695
1914
|
},
|
|
1696
|
-
required: ["workspaceId", "dirId"]
|
|
1697
|
-
allOf: createBrowser.inputSchema.allOf
|
|
1915
|
+
required: ["workspaceId", "dirId"]
|
|
1698
1916
|
};
|
|
1699
1917
|
get schema() {
|
|
1700
1918
|
return {
|
|
@@ -1704,22 +1922,6 @@ var UpdateBrowser = class {
|
|
|
1704
1922
|
};
|
|
1705
1923
|
}
|
|
1706
1924
|
async handle(params) {
|
|
1707
|
-
const validationError = validateBrowserConfig(params);
|
|
1708
|
-
if (validationError) {
|
|
1709
|
-
return {
|
|
1710
|
-
content: [{ type: "text", text: `\u274C **Invalid configuration:**
|
|
1711
|
-
|
|
1712
|
-
${validationError}` }]
|
|
1713
|
-
};
|
|
1714
|
-
}
|
|
1715
|
-
if (params.browserCore) {
|
|
1716
|
-
const [coreType, coreVersion] = params.browserCore.split(" ");
|
|
1717
|
-
params.coreType = coreType || "Chrome";
|
|
1718
|
-
params.coreVersion = coreVersion;
|
|
1719
|
-
delete params.browserCore;
|
|
1720
|
-
} else {
|
|
1721
|
-
params.coreType = "Chrome";
|
|
1722
|
-
}
|
|
1723
1925
|
const result = await request("/browser/mdf", {
|
|
1724
1926
|
method: "POST",
|
|
1725
1927
|
body: JSON.stringify(params)
|
|
@@ -1835,8 +2037,7 @@ var OpenBrowser = class {
|
|
|
1835
2037
|
`**Browser ${data.dirId || r.dirId || "Unknown"}** (PID:${data.pid ?? "Unknown"})`,
|
|
1836
2038
|
` - CDP WebSocket: \`${data.ws ?? "N/A"}\``,
|
|
1837
2039
|
` - HTTP Endpoint: \`${data.http ?? "N/A"}\``,
|
|
1838
|
-
` - Core Version: ${data.coreVersion ?? "Unknown"}
|
|
1839
|
-
` - Core Type: ${data.coreType ?? "Chrome"}`
|
|
2040
|
+
` - Core Version: ${data.coreVersion ?? "Unknown"}`
|
|
1840
2041
|
].join("\n");
|
|
1841
2042
|
})
|
|
1842
2043
|
].join("\n") : "";
|
|
@@ -1949,7 +2150,6 @@ var ListBrowsers = class {
|
|
|
1949
2150
|
const info = [
|
|
1950
2151
|
`Profile Name: **${browser.windowName || "Unnamed"}** (SN: ${serialNo})`,
|
|
1951
2152
|
` - CoreVersion: ${browser.coreVersion}`,
|
|
1952
|
-
` - CoreType: ${browser.coreType || "Chrome"}`,
|
|
1953
2153
|
` - OS: ${browser.os} ${browser.osVersion}`
|
|
1954
2154
|
];
|
|
1955
2155
|
if (browser.windowRemark) {
|
|
@@ -2190,8 +2390,6 @@ var GetBrowserDetail = class {
|
|
|
2190
2390
|
**Project:** ${detail.projectName} (ID: ${detail.projectId})
|
|
2191
2391
|
**OS:** ${detail.os} ${detail.osVersion}
|
|
2192
2392
|
**Core Version:** ${detail.coreVersion}
|
|
2193
|
-
**Core Type:** ${detail.coreType || "Chrome"}
|
|
2194
|
-
**Auto Latest Core:** ${detail.useLatestCore == 1 ? "\u2705 Enabled" : "\u274C Disabled"}
|
|
2195
2393
|
**Search Engine:** ${detail.searchEngine}
|
|
2196
2394
|
**Open Status:** ${detail.openStatus ? "\u2705 Opened" : "\u274C Closed"}
|
|
2197
2395
|
**Cookies:** ${cookieCount} stored (excluded from response to save tokens)
|
|
@@ -2511,7 +2709,6 @@ ${connections.map(
|
|
|
2511
2709
|
- CDP WebSocket: \`${conn.ws}\`
|
|
2512
2710
|
- HTTP Endpoint: \`${conn.http}\`
|
|
2513
2711
|
- Core Version: ${conn.coreVersion}
|
|
2514
|
-
- Core Type: ${conn.coreType || "Chrome"}
|
|
2515
2712
|
- Driver: ${conn.driver}`
|
|
2516
2713
|
).join("\n\n")}`;
|
|
2517
2714
|
}
|