open-agents-ai 0.187.140 → 0.187.141

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 +44 -39
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -242342,11 +242342,11 @@ var require_out = __commonJS({
242342
242342
  async.read(path5, getSettings(optionsOrSettingsOrCallback), callback);
242343
242343
  }
242344
242344
  exports.stat = stat6;
242345
- function statSync21(path5, optionsOrSettings) {
242345
+ function statSync22(path5, optionsOrSettings) {
242346
242346
  const settings = getSettings(optionsOrSettings);
242347
242347
  return sync.read(path5, settings);
242348
242348
  }
242349
- exports.statSync = statSync21;
242349
+ exports.statSync = statSync22;
242350
242350
  function getSettings(settingsOrOptions = {}) {
242351
242351
  if (settingsOrOptions instanceof settings_1.default) {
242352
242352
  return settingsOrOptions;
@@ -255381,13 +255381,14 @@ ${info}`, durationMs: performance.now() - start2 };
255381
255381
 
255382
255382
  // packages/execution/dist/tools/sdr-scan.js
255383
255383
  import { execSync as execSync32 } from "node:child_process";
255384
- import { readFileSync as readFileSync23, unlinkSync as unlinkSync7, existsSync as existsSync31, mkdirSync as mkdirSync12 } from "node:fs";
255384
+ import { readFileSync as readFileSync23, unlinkSync as unlinkSync7, existsSync as existsSync31, mkdirSync as mkdirSync12, statSync as statSync13 } from "node:fs";
255385
255385
  import { join as join46 } from "node:path";
255386
255386
  import { tmpdir as tmpdir10 } from "node:os";
255387
255387
  var SdrScanTool;
255388
255388
  var init_sdr_scan = __esm({
255389
255389
  "packages/execution/dist/tools/sdr-scan.js"() {
255390
255390
  "use strict";
255391
+ init_system_auth();
255391
255392
  SdrScanTool = class {
255392
255393
  name = "sdr_scan";
255393
255394
  description = "Scan radio frequencies with an RTL-SDR dongle. Actions: 'info' to check SDR hardware, 'scan' to sweep a frequency range, 'adsb' to detect aircraft transponders (1090 MHz), 'fm' to tune FM radio. Use this to explore the RF spectrum, detect signals, monitor aircraft, or listen to FM broadcasts. Requires an RTL-SDR USB dongle.";
@@ -255442,26 +255443,32 @@ var init_sdr_scan = __esm({
255442
255443
  return { success: false, output: "", error: `sdr_scan error: ${err instanceof Error ? err.message : String(err)}`, durationMs: performance.now() - start2 };
255443
255444
  }
255444
255445
  }
255445
- /** Auto-install rtl-sdr tools when hardware is detected but tools are missing */
255446
- ensureSdrTools() {
255446
+ /** Auto-install rtl-sdr tools when hardware is detected but tools are missing.
255447
+ * Uses system-native privilege elevation (pkexec/osascript/UAC) to trigger
255448
+ * the OS password dialog — no passwords stored in memory. */
255449
+ async ensureSdrTools() {
255447
255450
  try {
255448
255451
  execSync32("which rtl_test", { timeout: 3e3, stdio: "pipe" });
255449
255452
  return true;
255450
255453
  } catch {
255451
255454
  }
255452
255455
  try {
255453
- execSync32("sudo -n apt-get install -y rtl-sdr 2>&1", { timeout: 6e4, stdio: "pipe" });
255456
+ const result = await runElevated("apt-get install -y rtl-sdr", {
255457
+ timeout: 12e4,
255458
+ description: "Open Agents needs to install RTL-SDR tools for radio scanning"
255459
+ });
255460
+ if (result.success)
255461
+ return true;
255462
+ } catch {
255463
+ }
255464
+ try {
255465
+ execSync32("which rtl_test", { timeout: 3e3, stdio: "pipe" });
255454
255466
  return true;
255455
255467
  } catch {
255456
- try {
255457
- execSync32("apt list --installed 2>/dev/null | grep rtl-sdr", { timeout: 5e3, stdio: "pipe" });
255458
- return true;
255459
- } catch {
255460
- }
255461
255468
  }
255462
255469
  return false;
255463
255470
  }
255464
- deviceInfo(start2) {
255471
+ async deviceInfo(start2) {
255465
255472
  let usbDetected = false;
255466
255473
  let usbLine = "";
255467
255474
  try {
@@ -255478,7 +255485,7 @@ var init_sdr_scan = __esm({
255478
255485
  if (!usbDetected) {
255479
255486
  return { success: true, output: "No RTL-SDR device found. Connect an RTL-SDR USB dongle.", durationMs: performance.now() - start2 };
255480
255487
  }
255481
- const toolsReady = this.ensureSdrTools();
255488
+ const toolsReady = await this.ensureSdrTools();
255482
255489
  if (!toolsReady) {
255483
255490
  return {
255484
255491
  success: true,
@@ -255505,15 +255512,13 @@ Tools installed but rtl_test failed \u2014 device may be in use by another proce
255505
255512
  };
255506
255513
  }
255507
255514
  }
255508
- frequencyScan(args, start2) {
255515
+ async frequencyScan(args, start2) {
255509
255516
  const startFreq = args["start_freq"] || "433M";
255510
255517
  const endFreq = args["end_freq"] || "434M";
255511
255518
  const duration = args["duration"] || 10;
255512
255519
  const gain = args["gain"];
255513
- try {
255514
- execSync32("which rtl_power", { timeout: 3e3, stdio: "pipe" });
255515
- } catch {
255516
- return { success: false, output: "", error: "rtl_power not installed. Run: sudo apt install rtl-sdr", durationMs: performance.now() - start2 };
255520
+ if (!await this.ensureSdrTools()) {
255521
+ return { success: false, output: "", error: "rtl-sdr tools not installed. Connect an RTL-SDR dongle and retry (will prompt for install).", durationMs: performance.now() - start2 };
255517
255522
  }
255518
255523
  const captureDir = join46(tmpdir10(), "oa-sdr");
255519
255524
  if (!existsSync31(captureDir))
@@ -255564,7 +255569,7 @@ ${sigLines.join("\n")}`,
255564
255569
  return { success: false, output: "", error: `Scan failed: ${err instanceof Error ? err.message : String(err)}`, durationMs: performance.now() - start2 };
255565
255570
  }
255566
255571
  }
255567
- adsbScan(args, start2) {
255572
+ async adsbScan(args, start2) {
255568
255573
  const duration = args["duration"] || 30;
255569
255574
  for (const tool of ["dump1090", "rtl_adsb"]) {
255570
255575
  try {
@@ -255586,7 +255591,7 @@ ${output.slice(0, 2e3)}`,
255586
255591
  }
255587
255592
  return { success: false, output: "", error: "No ADS-B decoder available. Install: sudo apt install dump1090-mutability OR sudo apt install rtl-sdr", durationMs: performance.now() - start2 };
255588
255593
  }
255589
- fmTune(args, start2) {
255594
+ async fmTune(args, start2) {
255590
255595
  const frequency = args["frequency"] || "98.1M";
255591
255596
  const duration = Math.min(args["duration"] || 10, 30);
255592
255597
  try {
@@ -267025,7 +267030,7 @@ var init_constraint_learner = __esm({
267025
267030
  });
267026
267031
 
267027
267032
  // packages/orchestrator/dist/nexusBackend.js
267028
- import { existsSync as existsSync41, statSync as statSync13, openSync, readSync, closeSync, unlinkSync as unlinkSync9, writeFileSync as writeFileSync16 } from "node:fs";
267033
+ import { existsSync as existsSync41, statSync as statSync14, openSync, readSync, closeSync, unlinkSync as unlinkSync9, writeFileSync as writeFileSync16 } from "node:fs";
267029
267034
  import { watch as fsWatch } from "node:fs";
267030
267035
  import { join as join57 } from "node:path";
267031
267036
  import { tmpdir as tmpdir11 } from "node:os";
@@ -267331,7 +267336,7 @@ var init_nexusBackend = __esm({
267331
267336
  finish();
267332
267337
  }, 50);
267333
267338
  });
267334
- const stat6 = statSync13(streamFile, { throwIfNoEntry: false });
267339
+ const stat6 = statSync14(streamFile, { throwIfNoEntry: false });
267335
267340
  if (!stat6 || stat6.size <= position)
267336
267341
  continue;
267337
267342
  const fd = openSync(streamFile, "r");
@@ -275496,7 +275501,7 @@ import { EventEmitter as EventEmitter5 } from "node:events";
275496
275501
  import { randomBytes as randomBytes15 } from "node:crypto";
275497
275502
  import { URL as URL2 } from "node:url";
275498
275503
  import { loadavg, cpus as cpus2, totalmem as totalmem2, freemem as freemem2 } from "node:os";
275499
- import { existsSync as existsSync43, readFileSync as readFileSync32, writeFileSync as writeFileSync18, unlinkSync as unlinkSync10, mkdirSync as mkdirSync18, readdirSync as readdirSync10, statSync as statSync14 } from "node:fs";
275504
+ import { existsSync as existsSync43, readFileSync as readFileSync32, writeFileSync as writeFileSync18, unlinkSync as unlinkSync10, mkdirSync as mkdirSync18, readdirSync as readdirSync10, statSync as statSync15 } from "node:fs";
275500
275505
  import { join as join59 } from "node:path";
275501
275506
  function cleanForwardHeaders(raw, targetHost) {
275502
275507
  const out = {};
@@ -276779,7 +276784,7 @@ ${this.formatConnectionInfo()}`);
276779
276784
  let recentActive = 0;
276780
276785
  for (const f2 of files.slice(-10)) {
276781
276786
  try {
276782
- const st = statSync14(join59(invocDir, f2));
276787
+ const st = statSync15(join59(invocDir, f2));
276783
276788
  if (now - st.mtimeMs < 1e4) recentActive++;
276784
276789
  } catch {
276785
276790
  }
@@ -279008,7 +279013,7 @@ __export(oa_directory_exports, {
279008
279013
  writeIndexData: () => writeIndexData,
279009
279014
  writeIndexMeta: () => writeIndexMeta
279010
279015
  });
279011
- import { existsSync as existsSync46, mkdirSync as mkdirSync20, readFileSync as readFileSync35, writeFileSync as writeFileSync20, readdirSync as readdirSync11, statSync as statSync15, unlinkSync as unlinkSync11 } from "node:fs";
279016
+ import { existsSync as existsSync46, mkdirSync as mkdirSync20, readFileSync as readFileSync35, writeFileSync as writeFileSync20, readdirSync as readdirSync11, statSync as statSync16, unlinkSync as unlinkSync11 } from "node:fs";
279012
279017
  import { join as join63, relative as relative4, basename as basename12 } from "node:path";
279013
279018
  import { homedir as homedir16 } from "node:os";
279014
279019
  function initOaDirectory(repoRoot) {
@@ -279220,7 +279225,7 @@ function loadRecentSessions(repoRoot, limit = 5) {
279220
279225
  if (!existsSync46(historyDir)) return [];
279221
279226
  try {
279222
279227
  const files = readdirSync11(historyDir).filter((f2) => f2.endsWith(".json") && f2 !== "pending-task.json").map((f2) => {
279223
- const stat6 = statSync15(join63(historyDir, f2));
279228
+ const stat6 = statSync16(join63(historyDir, f2));
279224
279229
  return { file: f2, mtime: stat6.mtimeMs };
279225
279230
  }).sort((a2, b) => b.mtime - a2.mtime).slice(0, limit);
279226
279231
  return files.map((f2) => {
@@ -284149,7 +284154,7 @@ __export(personaplex_exports, {
284149
284154
  startPersonaPlexDaemon: () => startPersonaPlexDaemon,
284150
284155
  stopPersonaPlex: () => stopPersonaPlex
284151
284156
  });
284152
- import { existsSync as existsSync47, writeFileSync as writeFileSync21, readFileSync as readFileSync37, mkdirSync as mkdirSync21, copyFileSync as copyFileSync2, readdirSync as readdirSync12, statSync as statSync16 } from "node:fs";
284157
+ import { existsSync as existsSync47, writeFileSync as writeFileSync21, readFileSync as readFileSync37, mkdirSync as mkdirSync21, copyFileSync as copyFileSync2, readdirSync as readdirSync12, statSync as statSync17 } from "node:fs";
284153
284158
  import { join as join64, dirname as dirname20 } from "node:path";
284154
284159
  import { homedir as homedir17 } from "node:os";
284155
284160
  import { execSync as execSync41, spawn as spawn20 } from "node:child_process";
@@ -284683,7 +284688,7 @@ print('Converted')
284683
284688
  }
284684
284689
  if (existsSync47(cachedBf16)) {
284685
284690
  extraArgs.push("--moshi-weight", cachedBf16);
284686
- log22(`Using distilled weights: ${(statSync16(cachedBf16).size / 1024 ** 3).toFixed(1)}GB`);
284691
+ log22(`Using distilled weights: ${(statSync17(cachedBf16).size / 1024 ** 3).toFixed(1)}GB`);
284687
284692
  } else {
284688
284693
  extraArgs.push("--moshi-weight", weightPath);
284689
284694
  }
@@ -284714,7 +284719,7 @@ print('Converted')
284714
284719
  );
284715
284720
  if (existsSync47(cachedBf16)) {
284716
284721
  extraArgs.push("--moshi-weight", cachedBf16);
284717
- log22(`Using dequantized cache: ${(statSync16(cachedBf16).size / 1024 ** 3).toFixed(1)}GB`);
284722
+ log22(`Using dequantized cache: ${(statSync17(cachedBf16).size / 1024 ** 3).toFixed(1)}GB`);
284718
284723
  }
284719
284724
  } catch (e2) {
284720
284725
  log22(`Dequantization failed \u2014 server will try to load original weights`);
@@ -289198,7 +289203,7 @@ __export(voice_exports, {
289198
289203
  registerCustomOnnxModel: () => registerCustomOnnxModel,
289199
289204
  resetNarrationContext: () => resetNarrationContext
289200
289205
  });
289201
- import { existsSync as existsSync53, mkdirSync as mkdirSync25, writeFileSync as writeFileSync25, readFileSync as readFileSync41, unlinkSync as unlinkSync14, readdirSync as readdirSync13, statSync as statSync17 } from "node:fs";
289206
+ import { existsSync as existsSync53, mkdirSync as mkdirSync25, writeFileSync as writeFileSync25, readFileSync as readFileSync41, unlinkSync as unlinkSync14, readdirSync as readdirSync13, statSync as statSync18 } from "node:fs";
289202
289207
  import { join as join69, dirname as dirname22 } from "node:path";
289203
289208
  import { homedir as homedir20, tmpdir as tmpdir13, platform as platform4 } from "node:os";
289204
289209
  import { execSync as execSync44, spawn as nodeSpawn } from "node:child_process";
@@ -290263,7 +290268,7 @@ var init_voice = __esm({
290263
290268
  const p2 = join69(dir, f2);
290264
290269
  let size = 0;
290265
290270
  try {
290266
- size = statSync17(p2).size;
290271
+ size = statSync18(p2).size;
290267
290272
  } catch {
290268
290273
  }
290269
290274
  return {
@@ -291950,7 +291955,7 @@ Error: ${err instanceof Error ? err.message : String(err)}`
291950
291955
  // packages/cli/src/tui/commands.ts
291951
291956
  import * as nodeOs from "node:os";
291952
291957
  import { execSync as nodeExecSync } from "node:child_process";
291953
- import { existsSync as existsSync54, readFileSync as readFileSync42, writeFileSync as writeFileSync26, mkdirSync as mkdirSync26, readdirSync as readdirSync14, statSync as statSync18, rmSync as rmSync2, appendFileSync as appendFileSync3 } from "node:fs";
291958
+ import { existsSync as existsSync54, readFileSync as readFileSync42, writeFileSync as writeFileSync26, mkdirSync as mkdirSync26, readdirSync as readdirSync14, statSync as statSync19, rmSync as rmSync2, appendFileSync as appendFileSync3 } from "node:fs";
291954
291959
  import { join as join70 } from "node:path";
291955
291960
  async function _immediateReregister(newUrl) {
291956
291961
  if (!_lastRegisteredSponsorPayload) return;
@@ -292887,7 +292892,7 @@ async function handleSlashCommand(input, ctx3) {
292887
292892
  ipfsFiles = files.length;
292888
292893
  for (const f2 of files) {
292889
292894
  try {
292890
- ipfsBytes += statSync18(join70(ipfsLocalDir, f2)).size;
292895
+ ipfsBytes += statSync19(join70(ipfsLocalDir, f2)).size;
292891
292896
  } catch {
292892
292897
  }
292893
292898
  }
@@ -292900,7 +292905,7 @@ async function handleSlashCommand(input, ctx3) {
292900
292905
  else {
292901
292906
  heliaBlocks++;
292902
292907
  try {
292903
- heliaBytes += statSync18(join70(dir, entry.name)).size;
292908
+ heliaBytes += statSync19(join70(dir, entry.name)).size;
292904
292909
  } catch {
292905
292910
  }
292906
292911
  }
@@ -292992,7 +292997,7 @@ async function handleSlashCommand(input, ctx3) {
292992
292997
  const count = memStore.count();
292993
292998
  lines.push(`
292994
292999
  ${c3.bold("Structured Memory (SQLite)")}`);
292995
- lines.push(` Memories: ${c3.bold(String(count))} DB: ${c3.dim(formatFileSize(statSync18(dbPath).size))}`);
293000
+ lines.push(` Memories: ${c3.bold(String(count))} DB: ${c3.dim(formatFileSize(statSync19(dbPath).size))}`);
292996
293001
  cDb(db);
292997
293002
  }
292998
293003
  } catch {
@@ -293023,7 +293028,7 @@ async function handleSlashCommand(input, ctx3) {
293023
293028
  walkStorage(full, subCat);
293024
293029
  } else {
293025
293030
  try {
293026
- const sz = statSync18(full).size;
293031
+ const sz = statSync19(full).size;
293027
293032
  totalBytes += sz;
293028
293033
  if (!categories[category]) categories[category] = { files: 0, bytes: 0 };
293029
293034
  categories[category].files++;
@@ -295356,7 +295361,7 @@ async function showCohereDashboard(ctx3) {
295356
295361
  const snapItems = snaps.slice(0, 20).map((f2) => ({
295357
295362
  key: f2,
295358
295363
  label: f2.replace(".json", ""),
295359
- detail: `${formatFileSize(statSync18(join70(snapDir, f2)).size)}`
295364
+ detail: `${formatFileSize(statSync19(join70(snapDir, f2)).size)}`
295360
295365
  }));
295361
295366
  if (snapItems.length > 0) {
295362
295367
  await tuiSelect({
@@ -315798,7 +315803,7 @@ __export(index_repo_exports, {
315798
315803
  indexRepoCommand: () => indexRepoCommand
315799
315804
  });
315800
315805
  import { resolve as resolve37 } from "node:path";
315801
- import { existsSync as existsSync71, statSync as statSync20 } from "node:fs";
315806
+ import { existsSync as existsSync71, statSync as statSync21 } from "node:fs";
315802
315807
  import { cwd as cwd2 } from "node:process";
315803
315808
  async function indexRepoCommand(opts, _config3) {
315804
315809
  const repoRoot = resolve37(opts.repoPath ?? cwd2());
@@ -315808,7 +315813,7 @@ async function indexRepoCommand(opts, _config3) {
315808
315813
  printError(`Path does not exist: ${repoRoot}`);
315809
315814
  process.exit(1);
315810
315815
  }
315811
- const stat6 = statSync20(repoRoot);
315816
+ const stat6 = statSync21(repoRoot);
315812
315817
  if (!stat6.isDirectory()) {
315813
315818
  printError(`Path is not a directory: ${repoRoot}`);
315814
315819
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.140",
3
+ "version": "0.187.141",
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",