@roxybrowser/openapi 1.0.13-beta.8 → 1.0.14-beta.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/lib/cli.cjs CHANGED
@@ -1201,139 +1201,24 @@ var osversion_windows = [
1201
1201
  ];
1202
1202
  var osversion_macos = [
1203
1203
  {
1204
- label: "15.3.2",
1204
+ label: "26",
1205
1205
  type: "osVersion-macOS",
1206
- value: "15.3.2"
1206
+ value: "26"
1207
1207
  },
1208
1208
  {
1209
- label: "15.3.1",
1210
- type: "osVersion-macOS",
1211
- value: "15.3.1"
1212
- },
1213
- {
1214
- label: "15.3",
1215
- type: "osVersion-macOS",
1216
- value: "15.3"
1217
- },
1218
- {
1219
- label: "15.2",
1220
- type: "osVersion-macOS",
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",
1209
+ label: "15",
1325
1210
  type: "osVersion-macOS",
1326
- value: "13.7.2"
1211
+ value: "15"
1327
1212
  },
1328
1213
  {
1329
- label: "13.7.1",
1214
+ label: "14",
1330
1215
  type: "osVersion-macOS",
1331
- value: "13.7.1"
1216
+ value: "14"
1332
1217
  },
1333
1218
  {
1334
- label: "13.7",
1219
+ label: "13",
1335
1220
  type: "osVersion-macOS",
1336
- value: "13.7"
1221
+ value: "13"
1337
1222
  },
1338
1223
  {
1339
1224
  label: "ALL",
@@ -1349,6 +1234,11 @@ var osversion_linux = [
1349
1234
  }
1350
1235
  ];
1351
1236
  var osversion_android = [
1237
+ {
1238
+ label: "16",
1239
+ type: "osVersion-Android",
1240
+ value: "16"
1241
+ },
1352
1242
  {
1353
1243
  label: "15",
1354
1244
  type: "osVersion-Android",
@@ -1387,221 +1277,64 @@ var osversion_android = [
1387
1277
  ];
1388
1278
  var osversion_ios = [
1389
1279
  {
1390
- label: "18.2",
1280
+ label: "26",
1391
1281
  type: "osVersion-IOS",
1392
- value: "18.2"
1282
+ value: "26"
1393
1283
  },
1394
1284
  {
1395
- label: "18.1",
1285
+ label: "18",
1396
1286
  type: "osVersion-IOS",
1397
- value: "18.1"
1287
+ value: "18"
1398
1288
  },
1399
1289
  {
1400
- label: "18.0",
1290
+ label: "17",
1401
1291
  type: "osVersion-IOS",
1402
- value: "18.0"
1292
+ value: "17"
1403
1293
  },
1404
1294
  {
1405
- label: "17.0",
1295
+ label: "16",
1406
1296
  type: "osVersion-IOS",
1407
- value: "17.0"
1297
+ value: "16"
1408
1298
  },
1409
1299
  {
1410
- label: "16.6",
1411
- type: "osVersion-IOS",
1412
- value: "16.6"
1413
- },
1414
- {
1415
- label: "16.5",
1416
- type: "osVersion-IOS",
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",
1300
+ label: "15",
1516
1301
  type: "osVersion-IOS",
1517
- value: "14.1"
1302
+ value: "15"
1518
1303
  },
1519
1304
  {
1520
- label: "14.0",
1305
+ label: "14",
1521
1306
  type: "osVersion-IOS",
1522
- value: "14.0"
1307
+ value: "14"
1523
1308
  }
1524
1309
  ];
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
- }
1310
+ var browserCore = [
1311
+ "Firefox 146",
1312
+ "Chrome 149",
1313
+ "Chrome 148",
1314
+ "Chrome 147",
1315
+ "Chrome 146",
1316
+ "Chrome 145",
1317
+ "Chrome 144",
1318
+ "Chrome 143",
1319
+ "Chrome 142",
1320
+ "Chrome 141",
1321
+ "Chrome 140"
1601
1322
  ];
1602
1323
  function osVersionString() {
1603
1324
  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(",")}`;
1604
1325
  }
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
+ }
1605
1338
  var CreateBrowser = class {
1606
1339
  name = "roxy_create_browser";
1607
1340
  description = "Create a browser with complete configuration control - for expert users needing full parameter access";
@@ -1616,10 +1349,15 @@ var CreateBrowser = class {
1616
1349
  type: "string",
1617
1350
  description: "Browser window name"
1618
1351
  },
1619
- coreVersion: {
1352
+ browserCore: {
1620
1353
  type: "string",
1621
- enum: coreVersion.map((item) => item.value),
1622
- description: "Browser core version. If not provided, the latest available core version will be used."
1354
+ enum: browserCore,
1355
+ description: "Browser core version. Defaults to the latest Chrome version if not provided."
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."
1623
1361
  },
1624
1362
  os: {
1625
1363
  type: "string",
@@ -1628,7 +1366,7 @@ var CreateBrowser = class {
1628
1366
  },
1629
1367
  osVersion: {
1630
1368
  type: "string",
1631
- description: osVersionString()
1369
+ description: osVersionString() + '. Note: Firefox on macOS only supports "ALL".'
1632
1370
  },
1633
1371
  userAgent: {
1634
1372
  type: "string",
@@ -1779,7 +1517,24 @@ var CreateBrowser = class {
1779
1517
  }
1780
1518
  }
1781
1519
  },
1782
- required: ["workspaceId"]
1520
+ required: ["workspaceId", "browserCore"],
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
+ ]
1783
1538
  };
1784
1539
  get schema() {
1785
1540
  return {
@@ -1789,6 +1544,22 @@ var CreateBrowser = class {
1789
1544
  };
1790
1545
  }
1791
1546
  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
+ }
1792
1563
  const result = await request("/browser/create", {
1793
1564
  method: "POST",
1794
1565
  body: JSON.stringify(params)
@@ -1803,6 +1574,7 @@ var CreateBrowser = class {
1803
1574
  text = `\u2705 **Simple Browser Created**
1804
1575
 
1805
1576
  **Browser ID:** \`${data.dirId}\`
1577
+ **Core Type:** ${data.coreType || "Chrome"}
1806
1578
  *Use this browser ID with \`roxy_open_browsers\` to start the browser and get CDP endpoints for automation.*`;
1807
1579
  }
1808
1580
  return {
@@ -1828,7 +1600,8 @@ var BatchCreateBrowsers = class {
1828
1600
  items: {
1829
1601
  type: "object",
1830
1602
  properties: createBrowser.inputSchema.properties,
1831
- required: ["workspaceId"]
1603
+ required: ["workspaceId", "browserCore"],
1604
+ allOf: createBrowser.inputSchema.allOf
1832
1605
  }
1833
1606
  }
1834
1607
  },
@@ -1855,6 +1628,14 @@ var BatchCreateBrowsers = class {
1855
1628
  const results = [];
1856
1629
  const createPromises = params.browsers.map(async (browserParams, index) => {
1857
1630
  try {
1631
+ const validationError = validateBrowserConfig(browserParams);
1632
+ if (validationError) {
1633
+ return {
1634
+ index,
1635
+ success: false,
1636
+ error: validationError
1637
+ };
1638
+ }
1858
1639
  const result = await request("/browser/create", {
1859
1640
  method: "POST",
1860
1641
  body: JSON.stringify(browserParams)
@@ -1920,7 +1701,8 @@ var UpdateBrowser = class {
1920
1701
  properties: {
1921
1702
  ...createBrowser.inputSchema.properties
1922
1703
  },
1923
- required: ["workspaceId", "dirId"]
1704
+ required: ["workspaceId", "dirId"],
1705
+ allOf: createBrowser.inputSchema.allOf
1924
1706
  };
1925
1707
  get schema() {
1926
1708
  return {
@@ -1930,6 +1712,22 @@ var UpdateBrowser = class {
1930
1712
  };
1931
1713
  }
1932
1714
  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
+ }
1933
1731
  const result = await request("/browser/mdf", {
1934
1732
  method: "POST",
1935
1733
  body: JSON.stringify(params)
@@ -2045,7 +1843,8 @@ var OpenBrowser = class {
2045
1843
  `**Browser ${data.dirId || r.dirId || "Unknown"}** (PID:${data.pid ?? "Unknown"})`,
2046
1844
  ` - CDP WebSocket: \`${data.ws ?? "N/A"}\``,
2047
1845
  ` - HTTP Endpoint: \`${data.http ?? "N/A"}\``,
2048
- ` - Core Version: ${data.coreVersion ?? "Unknown"}`
1846
+ ` - Core Version: ${data.coreVersion ?? "Unknown"}`,
1847
+ ` - Core Type: ${data.coreType ?? "Chrome"}`
2049
1848
  ].join("\n");
2050
1849
  })
2051
1850
  ].join("\n") : "";
@@ -2158,6 +1957,7 @@ var ListBrowsers = class {
2158
1957
  const info = [
2159
1958
  `Profile Name: **${browser.windowName || "Unnamed"}** (SN: ${serialNo})`,
2160
1959
  ` - CoreVersion: ${browser.coreVersion}`,
1960
+ ` - CoreType: ${browser.coreType || "Chrome"}`,
2161
1961
  ` - OS: ${browser.os} ${browser.osVersion}`
2162
1962
  ];
2163
1963
  if (browser.windowRemark) {
@@ -2398,6 +2198,8 @@ var GetBrowserDetail = class {
2398
2198
  **Project:** ${detail.projectName} (ID: ${detail.projectId})
2399
2199
  **OS:** ${detail.os} ${detail.osVersion}
2400
2200
  **Core Version:** ${detail.coreVersion}
2201
+ **Core Type:** ${detail.coreType || "Chrome"}
2202
+ **Auto Latest Core:** ${detail.useLatestCore == 1 ? "\u2705 Enabled" : "\u274C Disabled"}
2401
2203
  **Search Engine:** ${detail.searchEngine}
2402
2204
  **Open Status:** ${detail.openStatus ? "\u2705 Opened" : "\u274C Closed"}
2403
2205
  **Cookies:** ${cookieCount} stored (excluded from response to save tokens)
@@ -2717,6 +2519,7 @@ ${connections.map(
2717
2519
  - CDP WebSocket: \`${conn.ws}\`
2718
2520
  - HTTP Endpoint: \`${conn.http}\`
2719
2521
  - Core Version: ${conn.coreVersion}
2522
+ - Core Type: ${conn.coreType || "Chrome"}
2720
2523
  - Driver: ${conn.driver}`
2721
2524
  ).join("\n\n")}`;
2722
2525
  }
@@ -2989,7 +2792,7 @@ async function runServer() {
2989
2792
  const server = new RoxyBrowserMCPServer();
2990
2793
  await server.run();
2991
2794
  }
2992
- dotenv__default.default.config({ quiet: true });
2795
+ dotenv__default.default.config();
2993
2796
  var PKG_VERSION = "1.0.9";
2994
2797
  var program = new commander.Command();
2995
2798
  program.name("roxy-browser-mcp").description("RoxyBrowser MCP Server - Model Context Protocol server for RoxyBrowser automation").version(PKG_VERSION, "-V, --version", "Show version").option(