@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/cli.cjs
CHANGED
|
@@ -1201,24 +1201,139 @@ var osversion_windows = [
|
|
|
1201
1201
|
];
|
|
1202
1202
|
var osversion_macos = [
|
|
1203
1203
|
{
|
|
1204
|
-
label: "
|
|
1204
|
+
label: "15.3.2",
|
|
1205
1205
|
type: "osVersion-macOS",
|
|
1206
|
-
value: "
|
|
1206
|
+
value: "15.3.2"
|
|
1207
1207
|
},
|
|
1208
1208
|
{
|
|
1209
|
-
label: "15",
|
|
1209
|
+
label: "15.3.1",
|
|
1210
1210
|
type: "osVersion-macOS",
|
|
1211
|
-
value: "15"
|
|
1211
|
+
value: "15.3.1"
|
|
1212
1212
|
},
|
|
1213
1213
|
{
|
|
1214
|
-
label: "
|
|
1214
|
+
label: "15.3",
|
|
1215
1215
|
type: "osVersion-macOS",
|
|
1216
|
-
value: "
|
|
1216
|
+
value: "15.3"
|
|
1217
1217
|
},
|
|
1218
1218
|
{
|
|
1219
|
-
label: "
|
|
1219
|
+
label: "15.2",
|
|
1220
1220
|
type: "osVersion-macOS",
|
|
1221
|
-
value: "
|
|
1221
|
+
value: "15.2"
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
label: "15.1",
|
|
1225
|
+
type: "osVersion-macOS",
|
|
1226
|
+
value: "15.1"
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
label: "15.0.1",
|
|
1230
|
+
type: "osVersion-macOS",
|
|
1231
|
+
value: "15.0.1"
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
label: "15.0",
|
|
1235
|
+
type: "osVersion-macOS",
|
|
1236
|
+
value: "15.0"
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
label: "14.7.4",
|
|
1240
|
+
type: "osVersion-macOS",
|
|
1241
|
+
value: "14.7.4"
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
label: "14.7.3",
|
|
1245
|
+
type: "osVersion-macOS",
|
|
1246
|
+
value: "14.7.3"
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
label: "14.7.2",
|
|
1250
|
+
type: "osVersion-macOS",
|
|
1251
|
+
value: "14.7.2"
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
label: "14.7.1",
|
|
1255
|
+
type: "osVersion-macOS",
|
|
1256
|
+
value: "14.7.1"
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
label: "14.7",
|
|
1260
|
+
type: "osVersion-macOS",
|
|
1261
|
+
value: "14.7"
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
label: "14.6.1",
|
|
1265
|
+
type: "osVersion-macOS",
|
|
1266
|
+
value: "14.6.1"
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
label: "14.6",
|
|
1270
|
+
type: "osVersion-macOS",
|
|
1271
|
+
value: "14.6"
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
label: "14.5",
|
|
1275
|
+
type: "osVersion-macOS",
|
|
1276
|
+
value: "14.5"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
label: "14.4.1",
|
|
1280
|
+
type: "osVersion-macOS",
|
|
1281
|
+
value: "14.4.1"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
label: "14.4",
|
|
1285
|
+
type: "osVersion-macOS",
|
|
1286
|
+
value: "14.4"
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
label: "14.3.1",
|
|
1290
|
+
type: "osVersion-macOS",
|
|
1291
|
+
value: "14.3.1"
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
label: "14.3",
|
|
1295
|
+
type: "osVersion-macOS",
|
|
1296
|
+
value: "14.3"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
label: "14.2.1",
|
|
1300
|
+
type: "osVersion-macOS",
|
|
1301
|
+
value: "14.2.1"
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
label: "14.2",
|
|
1305
|
+
type: "osVersion-macOS",
|
|
1306
|
+
value: "14.2"
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
label: "14.1",
|
|
1310
|
+
type: "osVersion-macOS",
|
|
1311
|
+
value: "14.1"
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
label: "13.7.4",
|
|
1315
|
+
type: "osVersion-macOS",
|
|
1316
|
+
value: "13.7.4"
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
label: "13.7.3",
|
|
1320
|
+
type: "osVersion-macOS",
|
|
1321
|
+
value: "13.7.3"
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
label: "13.7.2",
|
|
1325
|
+
type: "osVersion-macOS",
|
|
1326
|
+
value: "13.7.2"
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
label: "13.7.1",
|
|
1330
|
+
type: "osVersion-macOS",
|
|
1331
|
+
value: "13.7.1"
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
label: "13.7",
|
|
1335
|
+
type: "osVersion-macOS",
|
|
1336
|
+
value: "13.7"
|
|
1222
1337
|
},
|
|
1223
1338
|
{
|
|
1224
1339
|
label: "ALL",
|
|
@@ -1234,11 +1349,6 @@ var osversion_linux = [
|
|
|
1234
1349
|
}
|
|
1235
1350
|
];
|
|
1236
1351
|
var osversion_android = [
|
|
1237
|
-
{
|
|
1238
|
-
label: "16",
|
|
1239
|
-
type: "osVersion-Android",
|
|
1240
|
-
value: "16"
|
|
1241
|
-
},
|
|
1242
1352
|
{
|
|
1243
1353
|
label: "15",
|
|
1244
1354
|
type: "osVersion-Android",
|
|
@@ -1277,64 +1387,221 @@ var osversion_android = [
|
|
|
1277
1387
|
];
|
|
1278
1388
|
var osversion_ios = [
|
|
1279
1389
|
{
|
|
1280
|
-
label: "
|
|
1390
|
+
label: "18.2",
|
|
1281
1391
|
type: "osVersion-IOS",
|
|
1282
|
-
value: "
|
|
1392
|
+
value: "18.2"
|
|
1283
1393
|
},
|
|
1284
1394
|
{
|
|
1285
|
-
label: "18",
|
|
1395
|
+
label: "18.1",
|
|
1286
1396
|
type: "osVersion-IOS",
|
|
1287
|
-
value: "18"
|
|
1397
|
+
value: "18.1"
|
|
1288
1398
|
},
|
|
1289
1399
|
{
|
|
1290
|
-
label: "
|
|
1400
|
+
label: "18.0",
|
|
1291
1401
|
type: "osVersion-IOS",
|
|
1292
|
-
value: "
|
|
1402
|
+
value: "18.0"
|
|
1293
1403
|
},
|
|
1294
1404
|
{
|
|
1295
|
-
label: "
|
|
1405
|
+
label: "17.0",
|
|
1296
1406
|
type: "osVersion-IOS",
|
|
1297
|
-
value: "
|
|
1407
|
+
value: "17.0"
|
|
1298
1408
|
},
|
|
1299
1409
|
{
|
|
1300
|
-
label: "
|
|
1410
|
+
label: "16.6",
|
|
1301
1411
|
type: "osVersion-IOS",
|
|
1302
|
-
value: "
|
|
1412
|
+
value: "16.6"
|
|
1303
1413
|
},
|
|
1304
1414
|
{
|
|
1305
|
-
label: "
|
|
1415
|
+
label: "16.5",
|
|
1306
1416
|
type: "osVersion-IOS",
|
|
1307
|
-
value: "
|
|
1417
|
+
value: "16.5"
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
label: "16.4",
|
|
1421
|
+
type: "osVersion-IOS",
|
|
1422
|
+
value: "16.4"
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
label: "16.3",
|
|
1426
|
+
type: "osVersion-IOS",
|
|
1427
|
+
value: "16.3"
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
label: "16.2",
|
|
1431
|
+
type: "osVersion-IOS",
|
|
1432
|
+
value: "16.2"
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
label: "16.1",
|
|
1436
|
+
type: "osVersion-IOS",
|
|
1437
|
+
value: "16.1"
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
label: "16.0",
|
|
1441
|
+
type: "osVersion-IOS",
|
|
1442
|
+
value: "16.0"
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
label: "15.7",
|
|
1446
|
+
type: "osVersion-IOS",
|
|
1447
|
+
value: "15.7"
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
label: "15.6",
|
|
1451
|
+
type: "osVersion-IOS",
|
|
1452
|
+
value: "15.6"
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
label: "15.5",
|
|
1456
|
+
type: "osVersion-IOS",
|
|
1457
|
+
value: "15.5"
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
label: "15.4",
|
|
1461
|
+
type: "osVersion-IOS",
|
|
1462
|
+
value: "15.4"
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
label: "15.3",
|
|
1466
|
+
type: "osVersion-IOS",
|
|
1467
|
+
value: "15.3"
|
|
1468
|
+
},
|
|
1469
|
+
{
|
|
1470
|
+
label: "15.2",
|
|
1471
|
+
type: "osVersion-IOS",
|
|
1472
|
+
value: "15.2"
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
label: "15.1",
|
|
1476
|
+
type: "osVersion-IOS",
|
|
1477
|
+
value: "15.1"
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
label: "15.0",
|
|
1481
|
+
type: "osVersion-IOS",
|
|
1482
|
+
value: "15.0"
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
label: "14.7",
|
|
1486
|
+
type: "osVersion-IOS",
|
|
1487
|
+
value: "14.7"
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
label: "14.6",
|
|
1491
|
+
type: "osVersion-IOS",
|
|
1492
|
+
value: "14.6"
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
label: "14.5",
|
|
1496
|
+
type: "osVersion-IOS",
|
|
1497
|
+
value: "14.5"
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
label: "14.4",
|
|
1501
|
+
type: "osVersion-IOS",
|
|
1502
|
+
value: "14.4"
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
label: "14.3",
|
|
1506
|
+
type: "osVersion-IOS",
|
|
1507
|
+
value: "14.3"
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
label: "14.2",
|
|
1511
|
+
type: "osVersion-IOS",
|
|
1512
|
+
value: "14.2"
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
label: "14.1",
|
|
1516
|
+
type: "osVersion-IOS",
|
|
1517
|
+
value: "14.1"
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
label: "14.0",
|
|
1521
|
+
type: "osVersion-IOS",
|
|
1522
|
+
value: "14.0"
|
|
1308
1523
|
}
|
|
1309
1524
|
];
|
|
1310
|
-
var
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1525
|
+
var coreVersion = [
|
|
1526
|
+
{
|
|
1527
|
+
label: "RoxyChrome 144",
|
|
1528
|
+
type: "coreVersion",
|
|
1529
|
+
value: "144"
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
label: "RoxyChrome 143",
|
|
1533
|
+
type: "coreVersion",
|
|
1534
|
+
value: "143"
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
label: "RoxyChrome 142",
|
|
1538
|
+
type: "coreVersion",
|
|
1539
|
+
value: "142"
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
label: "RoxyChrome 141",
|
|
1543
|
+
type: "coreVersion",
|
|
1544
|
+
value: "141"
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
label: "RoxyChrome 140",
|
|
1548
|
+
type: "coreVersion",
|
|
1549
|
+
value: "140"
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
label: "RoxyChrome 139",
|
|
1553
|
+
type: "coreVersion",
|
|
1554
|
+
value: "139"
|
|
1555
|
+
},
|
|
1556
|
+
{
|
|
1557
|
+
label: "RoxyChrome 138",
|
|
1558
|
+
type: "coreVersion",
|
|
1559
|
+
value: "138"
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
label: "RoxyChrome 137",
|
|
1563
|
+
type: "coreVersion",
|
|
1564
|
+
value: "137"
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
label: "RoxyChrome 136",
|
|
1568
|
+
type: "coreVersion",
|
|
1569
|
+
value: "136"
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
label: "RoxyChrome 135",
|
|
1573
|
+
type: "coreVersion",
|
|
1574
|
+
value: "135"
|
|
1575
|
+
},
|
|
1576
|
+
{
|
|
1577
|
+
label: "RoxyChrome 133",
|
|
1578
|
+
type: "coreVersion",
|
|
1579
|
+
value: "133"
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
label: "RoxyChrome 130",
|
|
1583
|
+
type: "coreVersion",
|
|
1584
|
+
value: "130"
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
label: "RoxyChrome 125",
|
|
1588
|
+
type: "coreVersion",
|
|
1589
|
+
value: "125"
|
|
1590
|
+
},
|
|
1591
|
+
{
|
|
1592
|
+
label: "RoxyChrome 117",
|
|
1593
|
+
type: "coreVersion",
|
|
1594
|
+
value: "117"
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
label: "RoxyChrome 109",
|
|
1598
|
+
type: "coreVersion",
|
|
1599
|
+
value: "109"
|
|
1600
|
+
}
|
|
1322
1601
|
];
|
|
1323
1602
|
function osVersionString() {
|
|
1324
1603
|
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(",")}`;
|
|
1325
1604
|
}
|
|
1326
|
-
function validateBrowserConfig(params) {
|
|
1327
|
-
const os = params.os || "Windows";
|
|
1328
|
-
const browserCore2 = params.browserCore;
|
|
1329
|
-
if (!browserCore2) return null;
|
|
1330
|
-
const [coreType] = browserCore2.split(" ");
|
|
1331
|
-
if (coreType === "Firefox" && os === "macOS") {
|
|
1332
|
-
if (params.osVersion && params.osVersion !== "ALL") {
|
|
1333
|
-
return `Firefox on macOS only supports osVersion "ALL", but got "${params.osVersion}".`;
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
return null;
|
|
1337
|
-
}
|
|
1338
1605
|
var CreateBrowser = class {
|
|
1339
1606
|
name = "roxy_create_browser";
|
|
1340
1607
|
description = "Create a browser with complete configuration control - for expert users needing full parameter access";
|
|
@@ -1349,15 +1616,10 @@ var CreateBrowser = class {
|
|
|
1349
1616
|
type: "string",
|
|
1350
1617
|
description: "Browser window name"
|
|
1351
1618
|
},
|
|
1352
|
-
|
|
1619
|
+
coreVersion: {
|
|
1353
1620
|
type: "string",
|
|
1354
|
-
enum:
|
|
1355
|
-
description: "Browser core version.
|
|
1356
|
-
},
|
|
1357
|
-
useLatestCore: {
|
|
1358
|
-
type: "number",
|
|
1359
|
-
enum: [0, 1],
|
|
1360
|
-
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."
|
|
1621
|
+
enum: coreVersion.map((item) => item.value),
|
|
1622
|
+
description: "Browser core version. If not provided, the latest available core version will be used."
|
|
1361
1623
|
},
|
|
1362
1624
|
os: {
|
|
1363
1625
|
type: "string",
|
|
@@ -1366,7 +1628,7 @@ var CreateBrowser = class {
|
|
|
1366
1628
|
},
|
|
1367
1629
|
osVersion: {
|
|
1368
1630
|
type: "string",
|
|
1369
|
-
description: osVersionString()
|
|
1631
|
+
description: osVersionString()
|
|
1370
1632
|
},
|
|
1371
1633
|
userAgent: {
|
|
1372
1634
|
type: "string",
|
|
@@ -1517,24 +1779,7 @@ var CreateBrowser = class {
|
|
|
1517
1779
|
}
|
|
1518
1780
|
}
|
|
1519
1781
|
},
|
|
1520
|
-
required: ["workspaceId"
|
|
1521
|
-
allOf: [
|
|
1522
|
-
{
|
|
1523
|
-
// Firefox on macOS only supports osVersion "ALL"
|
|
1524
|
-
if: {
|
|
1525
|
-
properties: {
|
|
1526
|
-
browserCore: { pattern: "^Firefox" },
|
|
1527
|
-
os: { const: "macOS" }
|
|
1528
|
-
},
|
|
1529
|
-
required: ["browserCore", "os"]
|
|
1530
|
-
},
|
|
1531
|
-
then: {
|
|
1532
|
-
properties: {
|
|
1533
|
-
osVersion: { enum: ["ALL"] }
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
]
|
|
1782
|
+
required: ["workspaceId"]
|
|
1538
1783
|
};
|
|
1539
1784
|
get schema() {
|
|
1540
1785
|
return {
|
|
@@ -1544,22 +1789,6 @@ var CreateBrowser = class {
|
|
|
1544
1789
|
};
|
|
1545
1790
|
}
|
|
1546
1791
|
async handle(params) {
|
|
1547
|
-
const validationError = validateBrowserConfig(params);
|
|
1548
|
-
if (validationError) {
|
|
1549
|
-
return {
|
|
1550
|
-
content: [{ type: "text", text: `\u274C **Invalid configuration:**
|
|
1551
|
-
|
|
1552
|
-
${validationError}` }]
|
|
1553
|
-
};
|
|
1554
|
-
}
|
|
1555
|
-
if (params.browserCore) {
|
|
1556
|
-
const [coreType, coreVersion] = params.browserCore.split(" ");
|
|
1557
|
-
params.coreType = coreType || "Chrome";
|
|
1558
|
-
params.coreVersion = coreVersion;
|
|
1559
|
-
delete params.browserCore;
|
|
1560
|
-
} else {
|
|
1561
|
-
params.coreType = "Chrome";
|
|
1562
|
-
}
|
|
1563
1792
|
const result = await request("/browser/create", {
|
|
1564
1793
|
method: "POST",
|
|
1565
1794
|
body: JSON.stringify(params)
|
|
@@ -1574,7 +1803,6 @@ ${validationError}` }]
|
|
|
1574
1803
|
text = `\u2705 **Simple Browser Created**
|
|
1575
1804
|
|
|
1576
1805
|
**Browser ID:** \`${data.dirId}\`
|
|
1577
|
-
**Core Type:** ${data.coreType || "Chrome"}
|
|
1578
1806
|
*Use this browser ID with \`roxy_open_browsers\` to start the browser and get CDP endpoints for automation.*`;
|
|
1579
1807
|
}
|
|
1580
1808
|
return {
|
|
@@ -1600,8 +1828,7 @@ var BatchCreateBrowsers = class {
|
|
|
1600
1828
|
items: {
|
|
1601
1829
|
type: "object",
|
|
1602
1830
|
properties: createBrowser.inputSchema.properties,
|
|
1603
|
-
required: ["workspaceId"
|
|
1604
|
-
allOf: createBrowser.inputSchema.allOf
|
|
1831
|
+
required: ["workspaceId"]
|
|
1605
1832
|
}
|
|
1606
1833
|
}
|
|
1607
1834
|
},
|
|
@@ -1628,14 +1855,6 @@ var BatchCreateBrowsers = class {
|
|
|
1628
1855
|
const results = [];
|
|
1629
1856
|
const createPromises = params.browsers.map(async (browserParams, index) => {
|
|
1630
1857
|
try {
|
|
1631
|
-
const validationError = validateBrowserConfig(browserParams);
|
|
1632
|
-
if (validationError) {
|
|
1633
|
-
return {
|
|
1634
|
-
index,
|
|
1635
|
-
success: false,
|
|
1636
|
-
error: validationError
|
|
1637
|
-
};
|
|
1638
|
-
}
|
|
1639
1858
|
const result = await request("/browser/create", {
|
|
1640
1859
|
method: "POST",
|
|
1641
1860
|
body: JSON.stringify(browserParams)
|
|
@@ -1701,8 +1920,7 @@ var UpdateBrowser = class {
|
|
|
1701
1920
|
properties: {
|
|
1702
1921
|
...createBrowser.inputSchema.properties
|
|
1703
1922
|
},
|
|
1704
|
-
required: ["workspaceId", "dirId"]
|
|
1705
|
-
allOf: createBrowser.inputSchema.allOf
|
|
1923
|
+
required: ["workspaceId", "dirId"]
|
|
1706
1924
|
};
|
|
1707
1925
|
get schema() {
|
|
1708
1926
|
return {
|
|
@@ -1712,22 +1930,6 @@ var UpdateBrowser = class {
|
|
|
1712
1930
|
};
|
|
1713
1931
|
}
|
|
1714
1932
|
async handle(params) {
|
|
1715
|
-
const validationError = validateBrowserConfig(params);
|
|
1716
|
-
if (validationError) {
|
|
1717
|
-
return {
|
|
1718
|
-
content: [{ type: "text", text: `\u274C **Invalid configuration:**
|
|
1719
|
-
|
|
1720
|
-
${validationError}` }]
|
|
1721
|
-
};
|
|
1722
|
-
}
|
|
1723
|
-
if (params.browserCore) {
|
|
1724
|
-
const [coreType, coreVersion] = params.browserCore.split(" ");
|
|
1725
|
-
params.coreType = coreType || "Chrome";
|
|
1726
|
-
params.coreVersion = coreVersion;
|
|
1727
|
-
delete params.browserCore;
|
|
1728
|
-
} else {
|
|
1729
|
-
params.coreType = "Chrome";
|
|
1730
|
-
}
|
|
1731
1933
|
const result = await request("/browser/mdf", {
|
|
1732
1934
|
method: "POST",
|
|
1733
1935
|
body: JSON.stringify(params)
|
|
@@ -1843,8 +2045,7 @@ var OpenBrowser = class {
|
|
|
1843
2045
|
`**Browser ${data.dirId || r.dirId || "Unknown"}** (PID:${data.pid ?? "Unknown"})`,
|
|
1844
2046
|
` - CDP WebSocket: \`${data.ws ?? "N/A"}\``,
|
|
1845
2047
|
` - HTTP Endpoint: \`${data.http ?? "N/A"}\``,
|
|
1846
|
-
` - Core Version: ${data.coreVersion ?? "Unknown"}
|
|
1847
|
-
` - Core Type: ${data.coreType ?? "Chrome"}`
|
|
2048
|
+
` - Core Version: ${data.coreVersion ?? "Unknown"}`
|
|
1848
2049
|
].join("\n");
|
|
1849
2050
|
})
|
|
1850
2051
|
].join("\n") : "";
|
|
@@ -1957,7 +2158,6 @@ var ListBrowsers = class {
|
|
|
1957
2158
|
const info = [
|
|
1958
2159
|
`Profile Name: **${browser.windowName || "Unnamed"}** (SN: ${serialNo})`,
|
|
1959
2160
|
` - CoreVersion: ${browser.coreVersion}`,
|
|
1960
|
-
` - CoreType: ${browser.coreType || "Chrome"}`,
|
|
1961
2161
|
` - OS: ${browser.os} ${browser.osVersion}`
|
|
1962
2162
|
];
|
|
1963
2163
|
if (browser.windowRemark) {
|
|
@@ -2198,8 +2398,6 @@ var GetBrowserDetail = class {
|
|
|
2198
2398
|
**Project:** ${detail.projectName} (ID: ${detail.projectId})
|
|
2199
2399
|
**OS:** ${detail.os} ${detail.osVersion}
|
|
2200
2400
|
**Core Version:** ${detail.coreVersion}
|
|
2201
|
-
**Core Type:** ${detail.coreType || "Chrome"}
|
|
2202
|
-
**Auto Latest Core:** ${detail.useLatestCore == 1 ? "\u2705 Enabled" : "\u274C Disabled"}
|
|
2203
2401
|
**Search Engine:** ${detail.searchEngine}
|
|
2204
2402
|
**Open Status:** ${detail.openStatus ? "\u2705 Opened" : "\u274C Closed"}
|
|
2205
2403
|
**Cookies:** ${cookieCount} stored (excluded from response to save tokens)
|
|
@@ -2519,7 +2717,6 @@ ${connections.map(
|
|
|
2519
2717
|
- CDP WebSocket: \`${conn.ws}\`
|
|
2520
2718
|
- HTTP Endpoint: \`${conn.http}\`
|
|
2521
2719
|
- Core Version: ${conn.coreVersion}
|
|
2522
|
-
- Core Type: ${conn.coreType || "Chrome"}
|
|
2523
2720
|
- Driver: ${conn.driver}`
|
|
2524
2721
|
).join("\n\n")}`;
|
|
2525
2722
|
}
|
|
@@ -2792,7 +2989,7 @@ async function runServer() {
|
|
|
2792
2989
|
const server = new RoxyBrowserMCPServer();
|
|
2793
2990
|
await server.run();
|
|
2794
2991
|
}
|
|
2795
|
-
dotenv__default.default.config();
|
|
2992
|
+
dotenv__default.default.config({ quiet: true });
|
|
2796
2993
|
var PKG_VERSION = "1.0.9";
|
|
2797
2994
|
var program = new commander.Command();
|
|
2798
2995
|
program.name("roxy-browser-mcp").description("RoxyBrowser MCP Server - Model Context Protocol server for RoxyBrowser automation").version(PKG_VERSION, "-V, --version", "Show version").option(
|