@roxybrowser/openapi 1.0.13 → 1.0.14-beta.1

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/index.js CHANGED
@@ -1193,139 +1193,24 @@ var osversion_windows = [
1193
1193
  ];
1194
1194
  var osversion_macos = [
1195
1195
  {
1196
- label: "15.3.2",
1196
+ label: "26",
1197
1197
  type: "osVersion-macOS",
1198
- value: "15.3.2"
1198
+ value: "26"
1199
1199
  },
1200
1200
  {
1201
- label: "15.3.1",
1202
- type: "osVersion-macOS",
1203
- value: "15.3.1"
1204
- },
1205
- {
1206
- label: "15.3",
1207
- type: "osVersion-macOS",
1208
- value: "15.3"
1209
- },
1210
- {
1211
- label: "15.2",
1212
- type: "osVersion-macOS",
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",
1201
+ label: "15",
1317
1202
  type: "osVersion-macOS",
1318
- value: "13.7.2"
1203
+ value: "15"
1319
1204
  },
1320
1205
  {
1321
- label: "13.7.1",
1206
+ label: "14",
1322
1207
  type: "osVersion-macOS",
1323
- value: "13.7.1"
1208
+ value: "14"
1324
1209
  },
1325
1210
  {
1326
- label: "13.7",
1211
+ label: "13",
1327
1212
  type: "osVersion-macOS",
1328
- value: "13.7"
1213
+ value: "13"
1329
1214
  },
1330
1215
  {
1331
1216
  label: "ALL",
@@ -1341,6 +1226,11 @@ var osversion_linux = [
1341
1226
  }
1342
1227
  ];
1343
1228
  var osversion_android = [
1229
+ {
1230
+ label: "16",
1231
+ type: "osVersion-Android",
1232
+ value: "16"
1233
+ },
1344
1234
  {
1345
1235
  label: "15",
1346
1236
  type: "osVersion-Android",
@@ -1379,221 +1269,64 @@ var osversion_android = [
1379
1269
  ];
1380
1270
  var osversion_ios = [
1381
1271
  {
1382
- label: "18.2",
1272
+ label: "26",
1383
1273
  type: "osVersion-IOS",
1384
- value: "18.2"
1274
+ value: "26"
1385
1275
  },
1386
1276
  {
1387
- label: "18.1",
1277
+ label: "18",
1388
1278
  type: "osVersion-IOS",
1389
- value: "18.1"
1279
+ value: "18"
1390
1280
  },
1391
1281
  {
1392
- label: "18.0",
1282
+ label: "17",
1393
1283
  type: "osVersion-IOS",
1394
- value: "18.0"
1284
+ value: "17"
1395
1285
  },
1396
1286
  {
1397
- label: "17.0",
1287
+ label: "16",
1398
1288
  type: "osVersion-IOS",
1399
- value: "17.0"
1289
+ value: "16"
1400
1290
  },
1401
1291
  {
1402
- label: "16.6",
1403
- type: "osVersion-IOS",
1404
- value: "16.6"
1405
- },
1406
- {
1407
- label: "16.5",
1408
- type: "osVersion-IOS",
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",
1292
+ label: "15",
1508
1293
  type: "osVersion-IOS",
1509
- value: "14.1"
1294
+ value: "15"
1510
1295
  },
1511
1296
  {
1512
- label: "14.0",
1297
+ label: "14",
1513
1298
  type: "osVersion-IOS",
1514
- value: "14.0"
1299
+ value: "14"
1515
1300
  }
1516
1301
  ];
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
- }
1302
+ var browserCore = [
1303
+ "Firefox 146",
1304
+ "Chrome 149",
1305
+ "Chrome 148",
1306
+ "Chrome 147",
1307
+ "Chrome 146",
1308
+ "Chrome 145",
1309
+ "Chrome 144",
1310
+ "Chrome 143",
1311
+ "Chrome 142",
1312
+ "Chrome 141",
1313
+ "Chrome 140"
1593
1314
  ];
1594
1315
  function osVersionString() {
1595
1316
  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(",")}`;
1596
1317
  }
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
+ }
1597
1330
  var CreateBrowser = class {
1598
1331
  name = "roxy_create_browser";
1599
1332
  description = "Create a browser with complete configuration control - for expert users needing full parameter access";
@@ -1608,10 +1341,15 @@ var CreateBrowser = class {
1608
1341
  type: "string",
1609
1342
  description: "Browser window name"
1610
1343
  },
1611
- coreVersion: {
1344
+ browserCore: {
1612
1345
  type: "string",
1613
- enum: coreVersion.map((item) => item.value),
1614
- description: "Browser core version. If not provided, the latest available core version will be used."
1346
+ enum: browserCore,
1347
+ description: "Browser core version. Defaults to the latest Chrome version if not provided."
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."
1615
1353
  },
1616
1354
  os: {
1617
1355
  type: "string",
@@ -1620,7 +1358,7 @@ var CreateBrowser = class {
1620
1358
  },
1621
1359
  osVersion: {
1622
1360
  type: "string",
1623
- description: osVersionString()
1361
+ description: osVersionString() + '. Note: Firefox on macOS only supports "ALL".'
1624
1362
  },
1625
1363
  userAgent: {
1626
1364
  type: "string",
@@ -1771,7 +1509,24 @@ var CreateBrowser = class {
1771
1509
  }
1772
1510
  }
1773
1511
  },
1774
- required: ["workspaceId"]
1512
+ required: ["workspaceId", "browserCore"],
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
+ ]
1775
1530
  };
1776
1531
  get schema() {
1777
1532
  return {
@@ -1781,6 +1536,22 @@ var CreateBrowser = class {
1781
1536
  };
1782
1537
  }
1783
1538
  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
+ }
1784
1555
  const result = await request("/browser/create", {
1785
1556
  method: "POST",
1786
1557
  body: JSON.stringify(params)
@@ -1795,6 +1566,7 @@ var CreateBrowser = class {
1795
1566
  text = `\u2705 **Simple Browser Created**
1796
1567
 
1797
1568
  **Browser ID:** \`${data.dirId}\`
1569
+ **Core Type:** ${data.coreType || "Chrome"}
1798
1570
  *Use this browser ID with \`roxy_open_browsers\` to start the browser and get CDP endpoints for automation.*`;
1799
1571
  }
1800
1572
  return {
@@ -1820,7 +1592,8 @@ var BatchCreateBrowsers = class {
1820
1592
  items: {
1821
1593
  type: "object",
1822
1594
  properties: createBrowser.inputSchema.properties,
1823
- required: ["workspaceId"]
1595
+ required: ["workspaceId", "browserCore"],
1596
+ allOf: createBrowser.inputSchema.allOf
1824
1597
  }
1825
1598
  }
1826
1599
  },
@@ -1847,6 +1620,14 @@ var BatchCreateBrowsers = class {
1847
1620
  const results = [];
1848
1621
  const createPromises = params.browsers.map(async (browserParams, index) => {
1849
1622
  try {
1623
+ const validationError = validateBrowserConfig(browserParams);
1624
+ if (validationError) {
1625
+ return {
1626
+ index,
1627
+ success: false,
1628
+ error: validationError
1629
+ };
1630
+ }
1850
1631
  const result = await request("/browser/create", {
1851
1632
  method: "POST",
1852
1633
  body: JSON.stringify(browserParams)
@@ -1912,7 +1693,8 @@ var UpdateBrowser = class {
1912
1693
  properties: {
1913
1694
  ...createBrowser.inputSchema.properties
1914
1695
  },
1915
- required: ["workspaceId", "dirId"]
1696
+ required: ["workspaceId", "dirId"],
1697
+ allOf: createBrowser.inputSchema.allOf
1916
1698
  };
1917
1699
  get schema() {
1918
1700
  return {
@@ -1922,6 +1704,22 @@ var UpdateBrowser = class {
1922
1704
  };
1923
1705
  }
1924
1706
  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
+ }
1925
1723
  const result = await request("/browser/mdf", {
1926
1724
  method: "POST",
1927
1725
  body: JSON.stringify(params)
@@ -2037,7 +1835,8 @@ var OpenBrowser = class {
2037
1835
  `**Browser ${data.dirId || r.dirId || "Unknown"}** (PID:${data.pid ?? "Unknown"})`,
2038
1836
  ` - CDP WebSocket: \`${data.ws ?? "N/A"}\``,
2039
1837
  ` - HTTP Endpoint: \`${data.http ?? "N/A"}\``,
2040
- ` - Core Version: ${data.coreVersion ?? "Unknown"}`
1838
+ ` - Core Version: ${data.coreVersion ?? "Unknown"}`,
1839
+ ` - Core Type: ${data.coreType ?? "Chrome"}`
2041
1840
  ].join("\n");
2042
1841
  })
2043
1842
  ].join("\n") : "";
@@ -2149,7 +1948,7 @@ var ListBrowsers = class {
2149
1948
  const serialNo = `${browser.workspaceName?.slice(0, 3).toLocaleUpperCase()}-${browser.windowSortNum}`;
2150
1949
  const info = [
2151
1950
  `Profile Name: **${browser.windowName || "Unnamed"}** (SN: ${serialNo})`,
2152
- ` - CoreVersion: ${browser.coreVersion}`,
1951
+ ` - BrowserCore: ${browser.coreType || "Chrome"} ${browser.coreVersion}`,
2153
1952
  ` - OS: ${browser.os} ${browser.osVersion}`
2154
1953
  ];
2155
1954
  if (browser.windowRemark) {
@@ -2389,8 +2188,9 @@ var GetBrowserDetail = class {
2389
2188
  **Name:** ${detail.windowName}
2390
2189
  **Project:** ${detail.projectName} (ID: ${detail.projectId})
2391
2190
  **OS:** ${detail.os} ${detail.osVersion}
2392
- **Core Version:** ${detail.coreVersion}
2393
- **Search Engine:** ${detail.searchEngine}
2191
+ **BrowserCore**: ${detail.coreType || "Chrome"} ${detail.coreVersion}
2192
+ `, +`**Auto Latest Core:** ${detail.useLatestCore == 1 ? "\u2705 Enabled" : "\u274C Disabled"}
2193
+ ` + `**Search Engine:** ${detail.searchEngine}
2394
2194
  **Open Status:** ${detail.openStatus ? "\u2705 Opened" : "\u274C Closed"}
2395
2195
  **Cookies:** ${cookieCount} stored (excluded from response to save tokens)
2396
2196
 
@@ -2709,6 +2509,7 @@ ${connections.map(
2709
2509
  - CDP WebSocket: \`${conn.ws}\`
2710
2510
  - HTTP Endpoint: \`${conn.http}\`
2711
2511
  - Core Version: ${conn.coreVersion}
2512
+ - Core Type: ${conn.coreType || "Chrome"}
2712
2513
  - Driver: ${conn.driver}`
2713
2514
  ).join("\n\n")}`;
2714
2515
  }