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