open-agents-ai 0.187.147 → 0.187.149

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.
Files changed (2) hide show
  1. package/dist/index.js +127 -15
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -255871,11 +255871,19 @@ ${devices.join("\n")}`, durationMs: performance.now() - start2 };
255871
255871
  // =========================================================================
255872
255872
  findFlipperDevice() {
255873
255873
  try {
255874
- const devs = execSync33("ls /dev/ttyACM* 2>/dev/null", { encoding: "utf8", timeout: 3e3 }).trim().split("\n");
255875
- return devs[0] || null;
255874
+ const devs = execSync33("ls /dev/ttyACM* 2>/dev/null", { encoding: "utf8", timeout: 3e3 }).trim().split("\n").filter(Boolean);
255875
+ for (const dev of devs) {
255876
+ try {
255877
+ const udev = execSync33(`udevadm info --query=all --name=${dev} 2>/dev/null`, { encoding: "utf8", timeout: 3e3 });
255878
+ if (/flipper/i.test(udev) || udev.includes("0483") && udev.includes("5740")) {
255879
+ return dev;
255880
+ }
255881
+ } catch {
255882
+ }
255883
+ }
255876
255884
  } catch {
255877
- return null;
255878
255885
  }
255886
+ return null;
255879
255887
  }
255880
255888
  /** Send a command to Flipper's serial CLI and capture output */
255881
255889
  sendFlipperCommand(device, command, timeoutSec, start2, label) {
@@ -256447,13 +256455,69 @@ var init_gps_location = __esm({
256447
256455
  "use strict";
256448
256456
  init_system_auth();
256449
256457
  GPS_USB_IDS = [
256450
- { vid: "067b", pid: "2303", name: "BU-353N (Prolific PL2303)", baud: 4800 },
256451
- { vid: "067b", pid: "23a3", name: "BU-353S4 (Prolific PL2303GT)", baud: 4800 },
256452
- { vid: "1546", pid: "01a7", name: "U-blox 7", baud: 9600 },
256453
- { vid: "1546", pid: "01a8", name: "U-blox 8", baud: 9600 },
256454
- { vid: "1546", pid: "01a9", name: "U-blox 9", baud: 9600 },
256455
- { vid: "10c4", pid: "ea60", name: "U-blox (CP210x)", baud: 9600 },
256456
- { vid: "1a86", pid: "7523", name: "GPS (CH340)", baud: 9600 }
256458
+ // ── GlobalSat / BU-series (SiRF Star IV, Prolific UART bridge) ──────────
256459
+ // BU-353N, BU-353S4, BU-363, BU-503, BU-355 all use Prolific UART chips
256460
+ // The BU-363 specifically is a common USB GPS puck with SiRF Star IV
256461
+ { vid: "067b", pid: "2303", name: "GlobalSat BU-353/363 (Prolific PL2303)", baud: 4800, notes: "Most popular USB GPS puck family" },
256462
+ { vid: "067b", pid: "23a3", name: "GlobalSat BU-353S4/363 (Prolific PL2303GT)", baud: 4800 },
256463
+ { vid: "067b", pid: "2304", name: "GlobalSat BU-series (Prolific PL2303HXD)", baud: 4800 },
256464
+ { vid: "067b", pid: "aaa0", name: "GlobalSat BU-series (Prolific PL2303HX Rev A)", baud: 4800 },
256465
+ { vid: "067b", pid: "aaa2", name: "GlobalSat BU-series (Prolific PL2303 var)", baud: 4800 },
256466
+ { vid: "067b", pid: "2300", name: "Prolific PL2300 (GPS serial)", baud: 4800 },
256467
+ // ── U-blox GNSS family (direct USB — ACM devices) ──────────────────────
256468
+ { vid: "1546", pid: "01a5", name: "U-blox 5 (LEA-5T)", baud: 9600 },
256469
+ { vid: "1546", pid: "01a6", name: "U-blox 6 (NEO-6M)", baud: 9600, notes: "Very common maker GPS" },
256470
+ { vid: "1546", pid: "01a7", name: "U-blox 7 (NEO-7M)", baud: 9600 },
256471
+ { vid: "1546", pid: "01a8", name: "U-blox 8 (NEO-M8N/M8U)", baud: 9600, notes: "Multi-GNSS (GPS+GLONASS+Galileo+BeiDou)" },
256472
+ { vid: "1546", pid: "01a9", name: "U-blox 9 (NEO-M9N/ZED-F9P)", baud: 38400, notes: "RTK-capable, multi-band" },
256473
+ { vid: "1546", pid: "0502", name: "U-blox ZED-F9P (RTK)", baud: 38400, notes: "cm-level RTK GNSS" },
256474
+ { vid: "1546", pid: "0503", name: "U-blox ZED-F9R (dead reckoning)", baud: 38400 },
256475
+ // ── Silicon Labs CP210x UART bridge (many GPS modules use these) ────────
256476
+ { vid: "10c4", pid: "ea60", name: "GPS (SiLabs CP210x)", baud: 9600, notes: "Common UART bridge \u2014 many GPS modules" },
256477
+ { vid: "10c4", pid: "ea61", name: "GPS (SiLabs CP2102)", baud: 9600 },
256478
+ { vid: "10c4", pid: "ea63", name: "GPS (SiLabs CP2103)", baud: 9600 },
256479
+ { vid: "10c4", pid: "ea70", name: "GPS (SiLabs CP2105 dual)", baud: 9600 },
256480
+ { vid: "10c4", pid: "ea71", name: "GPS (SiLabs CP2108 quad)", baud: 9600 },
256481
+ // ── FTDI UART bridge (FT232R/FT2232 — used in many GPS devices) ────────
256482
+ { vid: "0403", pid: "6001", name: "GPS (FTDI FT232R)", baud: 9600, notes: "Very common UART bridge" },
256483
+ { vid: "0403", pid: "6010", name: "GPS (FTDI FT2232)", baud: 9600 },
256484
+ { vid: "0403", pid: "6014", name: "GPS (FTDI FT232H)", baud: 9600 },
256485
+ { vid: "0403", pid: "6015", name: "GPS (FTDI FT-X series)", baud: 9600 },
256486
+ // ── CH340/CH341 UART bridge (cheap Chinese GPS modules) ─────────────────
256487
+ { vid: "1a86", pid: "7523", name: "GPS (CH340)", baud: 9600, notes: "Budget UART bridge" },
256488
+ { vid: "1a86", pid: "5523", name: "GPS (CH341 serial)", baud: 9600 },
256489
+ { vid: "1a86", pid: "55d4", name: "GPS (CH9102F)", baud: 9600, notes: "Newer CH340 variant" },
256490
+ // ── SiRF Star chipsets (direct USB) ─────────────────────────────────────
256491
+ { vid: "0df7", pid: "0900", name: "SiRF Star III GPS", baud: 4800 },
256492
+ { vid: "16d0", pid: "0acf", name: "SiRF Star IV GPS", baud: 4800 },
256493
+ // ── MediaTek MTK GPS chipsets ───────────────────────────────────────────
256494
+ { vid: "0e8d", pid: "3329", name: "MediaTek MTK3329 GPS", baud: 9600 },
256495
+ { vid: "0e8d", pid: "3339", name: "MediaTek MTK3339 GPS", baud: 9600, notes: "Adafruit Ultimate GPS" },
256496
+ // ── Garmin USB GPS receivers ────────────────────────────────────────────
256497
+ { vid: "091e", pid: "0003", name: "Garmin GPS 18x USB", baud: 9600 },
256498
+ { vid: "091e", pid: "0004", name: "Garmin GPS 18x PC", baud: 4800 },
256499
+ { vid: "091e", pid: "2c84", name: "Garmin GLO / GLO 2", baud: 9600, notes: "Bluetooth+USB GPS" },
256500
+ // ── Marine / Aviation GPS ───────────────────────────────────────────────
256501
+ { vid: "1163", pid: "0100", name: "Trimble GPS (Ace III)", baud: 4800, notes: "Survey-grade" },
256502
+ { vid: "1163", pid: "0200", name: "Trimble GPS (AgGPS)", baud: 4800 },
256503
+ { vid: "1199", pid: "9001", name: "Sierra Wireless GPS", baud: 9600, notes: "Cellular+GPS combo" },
256504
+ { vid: "22b8", pid: "41c2", name: "Motorola Oncore GPS", baud: 9600 },
256505
+ // ── Quectel GNSS modules ────────────────────────────────────────────────
256506
+ { vid: "2c7c", pid: "0901", name: "Quectel L76/L80 GPS", baud: 9600, notes: "Popular IoT GNSS" },
256507
+ { vid: "2c7c", pid: "0306", name: "Quectel LC29H (RTK)", baud: 115200, notes: "Multi-band RTK" },
256508
+ // ── SparkFun / Adafruit / maker boards ──────────────────────────────────
256509
+ { vid: "1b4f", pid: "0100", name: "SparkFun GPS-RTK (ZED-F9P)", baud: 38400 },
256510
+ { vid: "239a", pid: "8011", name: "Adafruit GPS FeatherWing", baud: 9600 },
256511
+ { vid: "2341", pid: "0043", name: "Arduino (GPS shield via Mega)", baud: 9600 },
256512
+ // ── Septentrio high-precision GNSS ──────────────────────────────────────
256513
+ { vid: "152a", pid: "82a0", name: "Septentrio mosaic-X5", baud: 115200, notes: "Multi-frequency RTK" },
256514
+ // ── Broadcom / smartphone chipsets (USB tethering mode) ─────────────────
256515
+ { vid: "04e8", pid: "6860", name: "Samsung Phone GPS (USB tether)", baud: 9600 },
256516
+ { vid: "18d1", pid: "4ee1", name: "Google Pixel GPS (USB tether)", baud: 9600 },
256517
+ // ── Holux GPS receivers ─────────────────────────────────────────────────
256518
+ { vid: "0df7", pid: "0900", name: "Holux M-215/GR-213", baud: 4800 },
256519
+ // ── Navilock / Delock GPS dongles ───────────────────────────────────────
256520
+ { vid: "1546", pid: "01a4", name: "Navilock NL-442U (U-blox)", baud: 9600 }
256457
256521
  ];
256458
256522
  GpsLocationTool = class {
256459
256523
  name = "gps_location";
@@ -256829,34 +256893,82 @@ ${content.slice(0, 500)}`,
256829
256893
  // =========================================================================
256830
256894
  // Serial helpers
256831
256895
  // =========================================================================
256832
- /** Find the GPS serial device */
256896
+ /** Find the GPS serial device — checks USB IDs then probes for NMEA output */
256833
256897
  findGpsSerial() {
256834
- for (const dev of ["/dev/ttyUSB0", "/dev/ttyUSB1", "/dev/ttyACM0", "/dev/ttyACM1"]) {
256898
+ const candidates = [
256899
+ "/dev/ttyUSB0",
256900
+ "/dev/ttyUSB1",
256901
+ "/dev/ttyUSB2",
256902
+ "/dev/ttyACM0",
256903
+ "/dev/ttyACM1",
256904
+ "/dev/ttyACM2"
256905
+ ];
256906
+ const GPS_VENDOR_IDS = /* @__PURE__ */ new Set(["1546", "091e", "1163", "0df7", "16d0", "2c7c", "152a"]);
256907
+ const UART_BRIDGE_VIDS = /* @__PURE__ */ new Set(["067b", "10c4", "0403", "1a86"]);
256908
+ for (const dev of candidates) {
256835
256909
  if (!existsSync34(dev))
256836
256910
  continue;
256837
256911
  try {
256838
256912
  const udev = execSync36(`udevadm info --query=all --name=${dev} 2>/dev/null`, { encoding: "utf8", timeout: 3e3 });
256913
+ const vidMatch = udev.match(/ID_VENDOR_ID=([0-9a-f]+)/i);
256914
+ const vid = vidMatch?.[1]?.toLowerCase() || "";
256915
+ if (vid && GPS_VENDOR_IDS.has(vid))
256916
+ return dev;
256839
256917
  for (const gps of GPS_USB_IDS) {
256840
- if (udev.toLowerCase().includes(gps.vid))
256918
+ if (udev.toLowerCase().includes(gps.vid) && udev.toLowerCase().includes(gps.pid))
256841
256919
  return dev;
256842
256920
  }
256843
- if (/gps|gnss|prolific|sirf|ublox|u-blox/i.test(udev))
256921
+ if (vid && UART_BRIDGE_VIDS.has(vid) && dev.includes("ttyUSB"))
256922
+ return dev;
256923
+ if (/gps|gnss|sirf|ublox|u-blox|globalsat|garmin|trimble|quectel|septentrio|bu-353|bu-636|navsat/i.test(udev))
256844
256924
  return dev;
256845
256925
  } catch {
256846
256926
  }
256847
256927
  }
256928
+ for (const dev of candidates) {
256929
+ if (!existsSync34(dev))
256930
+ continue;
256931
+ if (this.probeNmea(dev))
256932
+ return dev;
256933
+ }
256848
256934
  return null;
256849
256935
  }
256850
- /** Detect baud rate for GPS device */
256936
+ /** Probe a serial device for NMEA output — tries multiple baud rates */
256937
+ probeNmea(device) {
256938
+ for (const baud of [9600, 4800, 38400, 115200]) {
256939
+ try {
256940
+ execSync36(`stty -F ${device} ${baud} raw -echo 2>/dev/null`, { timeout: 3e3, stdio: "pipe" });
256941
+ const data = execSync36(`timeout 2 cat ${device} 2>/dev/null || true`, { encoding: "utf8", timeout: 5e3 });
256942
+ if (/\$G[PNLA](GGA|RMC|GSV|GSA|GLL|VTG)/i.test(data))
256943
+ return true;
256944
+ } catch {
256945
+ }
256946
+ }
256947
+ return false;
256948
+ }
256949
+ /** Detect baud rate for GPS device — matches USB ID then auto-probes */
256851
256950
  detectBaud(device) {
256852
256951
  try {
256853
256952
  const udev = execSync36(`udevadm info --query=all --name=${device} 2>/dev/null`, { encoding: "utf8", timeout: 3e3 });
256953
+ for (const gps of GPS_USB_IDS) {
256954
+ if (udev.toLowerCase().includes(gps.vid) && udev.toLowerCase().includes(gps.pid))
256955
+ return gps.baud;
256956
+ }
256854
256957
  for (const gps of GPS_USB_IDS) {
256855
256958
  if (udev.toLowerCase().includes(gps.vid))
256856
256959
  return gps.baud;
256857
256960
  }
256858
256961
  } catch {
256859
256962
  }
256963
+ for (const baud of [9600, 4800, 38400, 115200]) {
256964
+ try {
256965
+ execSync36(`stty -F ${device} ${baud} raw -echo 2>/dev/null`, { timeout: 3e3, stdio: "pipe" });
256966
+ const data = execSync36(`timeout 2 cat ${device} 2>/dev/null || true`, { encoding: "utf8", timeout: 5e3 });
256967
+ if (/\$G[PNLA]/i.test(data))
256968
+ return baud;
256969
+ } catch {
256970
+ }
256971
+ }
256860
256972
  return 9600;
256861
256973
  }
256862
256974
  // =========================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.147",
3
+ "version": "0.187.149",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",