open-agents-ai 0.184.10 → 0.184.12

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 +104 -52
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5263,12 +5263,12 @@ var nexus_exports = {};
5263
5263
  __export(nexus_exports, {
5264
5264
  NexusTool: () => NexusTool
5265
5265
  });
5266
- import { readFile as readFile8, writeFile as writeFile6, mkdir as mkdir3, chmod, unlink, readdir as readdir2, open as fsOpen } from "node:fs/promises";
5266
+ import { readFile as readFile8, writeFile as writeFile6, mkdir as mkdir3, chmod, unlink, readdir as readdir2, open as fsOpen, copyFile as copyFile2 } from "node:fs/promises";
5267
5267
  import { existsSync as existsSync11, readFileSync as readFileSync8, watch as fsWatchLocal } from "node:fs";
5268
5268
  import { resolve as resolve13, join as join14 } from "node:path";
5269
5269
  import { randomBytes as randomBytes4, createCipheriv, createDecipheriv, scryptSync, createHash } from "node:crypto";
5270
5270
  import { execSync as execSync6, spawn as spawn2 } from "node:child_process";
5271
- import { hostname, userInfo } from "node:os";
5271
+ import { hostname, userInfo, homedir as homedir4 } from "node:os";
5272
5272
  function containsKeyMaterial(input) {
5273
5273
  for (const pattern of KEY_PATTERNS) {
5274
5274
  if (pattern.test(input))
@@ -5314,7 +5314,12 @@ mkdirSync(invocationsDir, { recursive: true });
5314
5314
  // Write PID so the agent can kill us
5315
5315
  writeFileSync(pidFile, String(process.pid));
5316
5316
 
5317
- const keyPath = join(nexusDir, 'identity.key');
5317
+ // Use GLOBAL identity key so all OA instances on this machine share one peerId.
5318
+ // Fallback to project-scoped key if global doesn't exist.
5319
+ const globalKeyDir = join(require('os').homedir(), '.open-agents');
5320
+ const globalKeyPath = join(globalKeyDir, 'identity.key');
5321
+ const projectKeyPath = join(nexusDir, 'identity.key');
5322
+ const keyPath = existsSync(globalKeyPath) ? globalKeyPath : projectKeyPath;
5318
5323
  var nexusOpts = {
5319
5324
  keyStorePath: keyPath,
5320
5325
  agentName,
@@ -8572,8 +8577,8 @@ process.on('SIGINT', () => process.emit('SIGTERM'));
8572
8577
  }
8573
8578
  } else {
8574
8579
  try {
8575
- const globalDir = await execAsync2("npm root -g", { timeout: 5e3 });
8576
- const globalPkg = join14(globalDir, "open-agents-nexus", "package.json");
8580
+ const globalDir2 = await execAsync2("npm root -g", { timeout: 5e3 });
8581
+ const globalPkg = join14(globalDir2, "open-agents-nexus", "package.json");
8577
8582
  if (existsSync11(globalPkg)) {
8578
8583
  nexusResolved = true;
8579
8584
  try {
@@ -8620,7 +8625,28 @@ process.on('SIGINT', () => process.emit('SIGTERM'));
8620
8625
  await this.ensureWallet();
8621
8626
  const daemonPath = join14(this.nexusDir, "nexus-daemon.mjs");
8622
8627
  await writeFile6(daemonPath, DAEMON_SCRIPT);
8628
+ const globalDir = join14(homedir4(), ".open-agents");
8629
+ const globalKeyPath = join14(globalDir, "identity.key");
8630
+ const projectKeyPath = join14(this.nexusDir, "identity.key");
8631
+ if (existsSync11(projectKeyPath) && !existsSync11(globalKeyPath)) {
8632
+ try {
8633
+ if (!existsSync11(globalDir))
8634
+ await mkdir3(globalDir, { recursive: true });
8635
+ await copyFile2(projectKeyPath, globalKeyPath);
8636
+ } catch {
8637
+ }
8638
+ }
8639
+ const effectiveKeyPath = existsSync11(globalKeyPath) ? globalKeyPath : projectKeyPath;
8640
+ const globalNamePath = join14(globalDir, "agent-name");
8623
8641
  const agentName = args.agent_name || (() => {
8642
+ try {
8643
+ if (existsSync11(globalNamePath)) {
8644
+ const custom = readFileSync8(globalNamePath, "utf8").trim();
8645
+ if (custom)
8646
+ return custom;
8647
+ }
8648
+ } catch {
8649
+ }
8624
8650
  const ADJ = ["swift", "bright", "calm", "deep", "bold", "keen", "warm", "clear", "soft", "sharp", "quick", "cool", "fair", "free", "kind", "pure", "sage", "true", "wild", "wise", "dark", "gold", "iron", "jade", "ruby", "silk", "void", "dawn", "dusk", "rain", "star", "moon", "wave", "fire", "snow", "leaf", "oak", "pine", "ash", "elm"];
8625
8651
  const NOUN = ["hawk", "wolf", "bear", "deer", "hare", "lynx", "crow", "wren", "dove", "swan", "pike", "bass", "carp", "reef", "tide", "vale", "glen", "peak", "mesa", "ford", "arch", "gate", "node", "core", "link", "mesh", "flux", "grid", "cell", "hub", "bolt", "gear", "coil", "ring", "lens", "orb", "cube", "dome", "shard", "rune"];
8626
8652
  const seed = `${hostname()}:${userInfo().username}`;
@@ -8635,8 +8661,8 @@ process.on('SIGINT', () => process.emit('SIGTERM'));
8635
8661
  const agentType = args.agent_type || "general";
8636
8662
  const nodePaths = [nodeModulesDir];
8637
8663
  try {
8638
- const globalDir = await execAsync2("npm root -g", { timeout: 5e3 });
8639
- nodePaths.push(globalDir);
8664
+ const globalDir2 = await execAsync2("npm root -g", { timeout: 5e3 });
8665
+ nodePaths.push(globalDir2);
8640
8666
  } catch {
8641
8667
  }
8642
8668
  const { openSync: openSync2, closeSync: closeSync2 } = await import("node:fs");
@@ -10572,10 +10598,10 @@ __export(custom_tool_exports, {
10572
10598
  });
10573
10599
  import { existsSync as existsSync13, readdirSync as readdirSync4, readFileSync as readFileSync10, mkdirSync as mkdirSync5, writeFileSync as writeFileSync5 } from "node:fs";
10574
10600
  import { join as join16 } from "node:path";
10575
- import { homedir as homedir4 } from "node:os";
10601
+ import { homedir as homedir5 } from "node:os";
10576
10602
  import { spawn as spawn4 } from "node:child_process";
10577
10603
  function globalToolsDir() {
10578
- return join16(homedir4(), ".open-agents", "tools");
10604
+ return join16(homedir5(), ".open-agents", "tools");
10579
10605
  }
10580
10606
  function projectToolsDir(repoRoot) {
10581
10607
  return join16(repoRoot, ".oa", "tools");
@@ -11069,10 +11095,10 @@ var init_tool_creator = __esm({
11069
11095
  // packages/execution/dist/tools/skill-tools.js
11070
11096
  import { existsSync as existsSync14, readdirSync as readdirSync5, readFileSync as readFileSync11 } from "node:fs";
11071
11097
  import { join as join17, basename as basename3, dirname as dirname3 } from "node:path";
11072
- import { homedir as homedir5 } from "node:os";
11098
+ import { homedir as homedir6 } from "node:os";
11073
11099
  import { execSync as execSync9 } from "node:child_process";
11074
11100
  function getAiwgPaths() {
11075
- const dataDir = join17(homedir5(), ".local", "share", "ai-writing-guide");
11101
+ const dataDir = join17(homedir6(), ".local", "share", "ai-writing-guide");
11076
11102
  return {
11077
11103
  frameworksDir: join17(dataDir, "agentic", "code", "frameworks"),
11078
11104
  addonsDir: join17(dataDir, "agentic", "code", "addons"),
@@ -11098,7 +11124,7 @@ function findAiwgPackageRoot() {
11098
11124
  const candidates = [
11099
11125
  "/usr/local/lib/node_modules/aiwg",
11100
11126
  "/usr/lib/node_modules/aiwg",
11101
- join17(homedir5(), ".nvm", "versions")
11127
+ join17(homedir6(), ".nvm", "versions")
11102
11128
  // nvm — need to search deeper
11103
11129
  ];
11104
11130
  for (const c3 of candidates) {
@@ -11754,7 +11780,7 @@ ${content}`
11754
11780
  // packages/execution/dist/tools/transcribe-tool.js
11755
11781
  import { existsSync as existsSync16, mkdirSync as mkdirSync7, writeFileSync as writeFileSync7, readFileSync as readFileSync13, unlinkSync } from "node:fs";
11756
11782
  import { join as join19, basename as basename4, extname as extname3, resolve as resolve15 } from "node:path";
11757
- import { homedir as homedir6 } from "node:os";
11783
+ import { homedir as homedir7 } from "node:os";
11758
11784
  import { execSync as execSync10, spawn as spawn5 } from "node:child_process";
11759
11785
  function isTranscribable(path) {
11760
11786
  const ext = extname3(path).toLowerCase();
@@ -11779,7 +11805,7 @@ async function loadTranscribeCli() {
11779
11805
  }
11780
11806
  } catch {
11781
11807
  }
11782
- const nvmBase = join19(homedir6(), ".nvm", "versions", "node");
11808
+ const nvmBase = join19(homedir7(), ".nvm", "versions", "node");
11783
11809
  if (existsSync16(nvmBase)) {
11784
11810
  try {
11785
11811
  const { readdirSync: readdirSync21 } = await import("node:fs");
@@ -16583,7 +16609,7 @@ import { existsSync as existsSync21, statSync as statSync8 } from "node:fs";
16583
16609
  import { resolve as resolve21, basename as basename8, dirname as dirname8, join as join31 } from "node:path";
16584
16610
  import { execSync as execSync15 } from "node:child_process";
16585
16611
  import { fileURLToPath as fileURLToPath4 } from "node:url";
16586
- import { homedir as homedir7, tmpdir as tmpdir6 } from "node:os";
16612
+ import { homedir as homedir8, tmpdir as tmpdir6 } from "node:os";
16587
16613
  function findOcrScript() {
16588
16614
  const thisDir = dirname8(fileURLToPath4(import.meta.url));
16589
16615
  const devPath3 = resolve21(thisDir, "../../scripts/ocr-advanced.py");
@@ -16599,7 +16625,7 @@ function findOcrScript() {
16599
16625
  }
16600
16626
  function findPython() {
16601
16627
  const isWin2 = process.platform === "win32";
16602
- const venvPython2 = isWin2 ? join31(homedir7(), ".open-agents", "venv", "Scripts", "python.exe") : join31(homedir7(), ".open-agents", "venv", "bin", "python");
16628
+ const venvPython2 = isWin2 ? join31(homedir8(), ".open-agents", "venv", "Scripts", "python.exe") : join31(homedir8(), ".open-agents", "venv", "bin", "python");
16603
16629
  if (existsSync21(venvPython2)) {
16604
16630
  try {
16605
16631
  execSync15(`${JSON.stringify(venvPython2)} -c "import cv2, pytesseract, numpy, PIL"`, {
@@ -17672,7 +17698,7 @@ train.py reverted to last kept state. Ready for next experiment.`,
17672
17698
  import { execSync as execSync18, exec as execCb } from "node:child_process";
17673
17699
  import { readFile as readFile15, writeFile as writeFile15, mkdir as mkdir11 } from "node:fs/promises";
17674
17700
  import { resolve as resolve23, join as join34 } from "node:path";
17675
- import { homedir as homedir8 } from "node:os";
17701
+ import { homedir as homedir9 } from "node:os";
17676
17702
  import { randomBytes as randomBytes6 } from "node:crypto";
17677
17703
  function isValidCron(expr) {
17678
17704
  const parts = expr.trim().split(/\s+/);
@@ -17803,7 +17829,7 @@ async function saveStore(workingDir, store) {
17803
17829
  await writeFile15(join34(dir, "tasks.json"), JSON.stringify(store, null, 2), "utf-8");
17804
17830
  }
17805
17831
  function globalStoreDir() {
17806
- return join34(homedir8(), ".open-agents", "scheduled");
17832
+ return join34(homedir9(), ".open-agents", "scheduled");
17807
17833
  }
17808
17834
  async function loadGlobalStore() {
17809
17835
  try {
@@ -19321,7 +19347,7 @@ var init_factory = __esm({
19321
19347
  import { execSync as execSync21 } from "node:child_process";
19322
19348
  import { readFile as readFile18, writeFile as writeFile18, mkdir as mkdir14 } from "node:fs/promises";
19323
19349
  import { resolve as resolve27, join as join39 } from "node:path";
19324
- import { homedir as homedir9 } from "node:os";
19350
+ import { homedir as homedir10 } from "node:os";
19325
19351
  import { randomBytes as randomBytes9 } from "node:crypto";
19326
19352
  function isValidCron2(expr) {
19327
19353
  const parts = expr.trim().split(/\s+/);
@@ -19451,7 +19477,7 @@ async function saveStore2(workingDir, store) {
19451
19477
  await writeFile18(join39(dir, "store.json"), JSON.stringify(store, null, 2), "utf-8");
19452
19478
  }
19453
19479
  function globalCronDir() {
19454
- return join39(homedir9(), ".open-agents", "cron-agents");
19480
+ return join39(homedir10(), ".open-agents", "cron-agents");
19455
19481
  }
19456
19482
  async function loadGlobalCronStore() {
19457
19483
  try {
@@ -29619,7 +29645,7 @@ __export(listen_exports, {
29619
29645
  import { spawn as spawn16, execSync as execSync25 } from "node:child_process";
29620
29646
  import { existsSync as existsSync32, mkdirSync as mkdirSync11, writeFileSync as writeFileSync12, readdirSync as readdirSync8 } from "node:fs";
29621
29647
  import { join as join48, dirname as dirname14 } from "node:path";
29622
- import { homedir as homedir10 } from "node:os";
29648
+ import { homedir as homedir11 } from "node:os";
29623
29649
  import { fileURLToPath as fileURLToPath8 } from "node:url";
29624
29650
  import { EventEmitter } from "node:events";
29625
29651
  import { createInterface as createInterface2 } from "node:readline";
@@ -29731,7 +29757,7 @@ function findLiveWhisperScript() {
29731
29757
  }
29732
29758
  } catch {
29733
29759
  }
29734
- const nvmBase = join48(homedir10(), ".nvm", "versions", "node");
29760
+ const nvmBase = join48(homedir11(), ".nvm", "versions", "node");
29735
29761
  if (existsSync32(nvmBase)) {
29736
29762
  try {
29737
29763
  for (const ver of readdirSync8(nvmBase)) {
@@ -29985,7 +30011,7 @@ var init_listen = __esm({
29985
30011
  }
29986
30012
  } catch {
29987
30013
  }
29988
- const nvmBase = join48(homedir10(), ".nvm", "versions", "node");
30014
+ const nvmBase = join48(homedir11(), ".nvm", "versions", "node");
29989
30015
  if (existsSync32(nvmBase)) {
29990
30016
  try {
29991
30017
  const { readdirSync: readdirSync21 } = await import("node:fs");
@@ -34736,6 +34762,8 @@ var init_render = __esm({
34736
34762
  ["/cohere deny <model>", "Hide a model from remote COHERE queries"],
34737
34763
  ["/nexus", "Show nexus P2P network status"],
34738
34764
  ["/nexus connect", "Connect to the agent mesh network"],
34765
+ ["/nexus name <name>", "Set custom agent name (persists globally across all OA instances)"],
34766
+ ["/nexus name", "Show current agent name"],
34739
34767
  ["/nexus restart", "Kill daemon and reconnect (picks up new version)"],
34740
34768
  ["/nexus restart --clean", "Restart + clear metering data for fresh stats"],
34741
34769
  ["/nexus disconnect", "Kill daemon without reconnecting"],
@@ -34744,6 +34772,7 @@ var init_render = __esm({
34744
34772
  ["/sponsor status", "Show sponsor dashboard with usage metrics"],
34745
34773
  ["/sponsor pause", "Pause active sponsorship"],
34746
34774
  ["/sponsor remove", "Remove sponsorship entirely"],
34775
+ ["/endpoint sponsor", "Browse and connect to sponsored inference from the nexus mesh"],
34747
34776
  ["/expose <backend>", "Expose local inference via libp2p (default)"],
34748
34777
  ["/expose <backend> --tunnel", "Expose via cloudflared tunnel"],
34749
34778
  ["/expose passthrough", "Forward configured /endpoint through libp2p P2P"],
@@ -39010,7 +39039,7 @@ __export(oa_directory_exports, {
39010
39039
  });
39011
39040
  import { existsSync as existsSync36, mkdirSync as mkdirSync14, readFileSync as readFileSync27, writeFileSync as writeFileSync15, readdirSync as readdirSync10, statSync as statSync12, unlinkSync as unlinkSync7 } from "node:fs";
39012
39041
  import { join as join53, relative as relative3, basename as basename11, extname as extname9 } from "node:path";
39013
- import { homedir as homedir11 } from "node:os";
39042
+ import { homedir as homedir12 } from "node:os";
39014
39043
  function initOaDirectory(repoRoot) {
39015
39044
  const oaPath = join53(repoRoot, OA_DIR);
39016
39045
  for (const sub of SUBDIRS) {
@@ -39050,7 +39079,7 @@ function saveProjectSettings(repoRoot, settings) {
39050
39079
  writeFileSync15(join53(oaPath, "settings.json"), JSON.stringify(merged, null, 2) + "\n", { encoding: "utf-8", mode: 384 });
39051
39080
  }
39052
39081
  function loadGlobalSettings() {
39053
- const settingsPath = join53(homedir11(), ".open-agents", "settings.json");
39082
+ const settingsPath = join53(homedir12(), ".open-agents", "settings.json");
39054
39083
  try {
39055
39084
  if (existsSync36(settingsPath)) {
39056
39085
  return JSON.parse(readFileSync27(settingsPath, "utf-8"));
@@ -39060,7 +39089,7 @@ function loadGlobalSettings() {
39060
39089
  return {};
39061
39090
  }
39062
39091
  function saveGlobalSettings(settings) {
39063
- const dir = join53(homedir11(), ".open-agents");
39092
+ const dir = join53(homedir12(), ".open-agents");
39064
39093
  mkdirSync14(dir, { recursive: true });
39065
39094
  const existing = loadGlobalSettings();
39066
39095
  const merged = { ...existing, ...settings };
@@ -39440,13 +39469,13 @@ function recordUsage(kind, value, opts) {
39440
39469
  }
39441
39470
  saveUsageFile(filePath, data);
39442
39471
  };
39443
- update(join53(homedir11(), ".open-agents", USAGE_HISTORY_FILE));
39472
+ update(join53(homedir12(), ".open-agents", USAGE_HISTORY_FILE));
39444
39473
  if (opts?.repoRoot) {
39445
39474
  update(join53(opts.repoRoot, OA_DIR, USAGE_HISTORY_FILE));
39446
39475
  }
39447
39476
  }
39448
39477
  function loadUsageHistory(kind, repoRoot) {
39449
- const globalPath = join53(homedir11(), ".open-agents", USAGE_HISTORY_FILE);
39478
+ const globalPath = join53(homedir12(), ".open-agents", USAGE_HISTORY_FILE);
39450
39479
  const globalData = loadUsageFile(globalPath);
39451
39480
  const localData = repoRoot ? loadUsageFile(join53(repoRoot, OA_DIR, USAGE_HISTORY_FILE)) : { records: [] };
39452
39481
  const map = /* @__PURE__ */ new Map();
@@ -39479,7 +39508,7 @@ function deleteUsageRecord(kind, value, repoRoot) {
39479
39508
  saveUsageFile(filePath, data);
39480
39509
  }
39481
39510
  };
39482
- remove(join53(homedir11(), ".open-agents", USAGE_HISTORY_FILE));
39511
+ remove(join53(homedir12(), ".open-agents", USAGE_HISTORY_FILE));
39483
39512
  if (repoRoot) {
39484
39513
  remove(join53(repoRoot, OA_DIR, USAGE_HISTORY_FILE));
39485
39514
  }
@@ -39533,7 +39562,7 @@ import { execSync as execSync27, spawn as spawn19, exec as exec2 } from "node:ch
39533
39562
  import { promisify as promisify6 } from "node:util";
39534
39563
  import { existsSync as existsSync37, writeFileSync as writeFileSync16, readFileSync as readFileSync28, appendFileSync as appendFileSync2, mkdirSync as mkdirSync15 } from "node:fs";
39535
39564
  import { join as join54 } from "node:path";
39536
- import { homedir as homedir12, platform as platform2 } from "node:os";
39565
+ import { homedir as homedir13, platform as platform2 } from "node:os";
39537
39566
  async function checkToolSupport(modelName, backendUrl = "http://localhost:11434") {
39538
39567
  if (_toolSupportCache.has(modelName))
39539
39568
  return _toolSupportCache.get(modelName);
@@ -40598,7 +40627,7 @@ async function doSetup(config, rl) {
40598
40627
  `PARAMETER num_predict ${numPredict}`,
40599
40628
  `PARAMETER stop "<|endoftext|>"`
40600
40629
  ].join("\n");
40601
- const modelDir2 = join54(homedir12(), ".open-agents", "models");
40630
+ const modelDir2 = join54(homedir13(), ".open-agents", "models");
40602
40631
  mkdirSync15(modelDir2, { recursive: true });
40603
40632
  const modelfilePath = join54(modelDir2, `Modelfile.${customName}`);
40604
40633
  writeFileSync16(modelfilePath, modelfileContent + "\n", "utf8");
@@ -40646,7 +40675,7 @@ async function isModelAvailable(config) {
40646
40675
  }
40647
40676
  function isFirstRun() {
40648
40677
  try {
40649
- return !existsSync37(join54(homedir12(), ".open-agents", "config.json"));
40678
+ return !existsSync37(join54(homedir13(), ".open-agents", "config.json"));
40650
40679
  } catch {
40651
40680
  return true;
40652
40681
  }
@@ -40683,7 +40712,7 @@ function detectPkgManager() {
40683
40712
  return null;
40684
40713
  }
40685
40714
  function getVenvDir() {
40686
- return join54(homedir12(), ".open-agents", "venv");
40715
+ return join54(homedir13(), ".open-agents", "venv");
40687
40716
  }
40688
40717
  function hasVenvModule() {
40689
40718
  try {
@@ -40710,7 +40739,7 @@ function ensureVenv(log) {
40710
40739
  return null;
40711
40740
  }
40712
40741
  try {
40713
- mkdirSync15(join54(homedir12(), ".open-agents"), { recursive: true });
40742
+ mkdirSync15(join54(homedir13(), ".open-agents"), { recursive: true });
40714
40743
  const pyCmd = hasCmd(pythonCmd) ? pythonCmd : "python3";
40715
40744
  execSync27(`${pyCmd} -m venv "${venvDir}"`, { stdio: "pipe", timeout: 3e4 });
40716
40745
  execSync27(`"${pipPath}" install --upgrade pip`, {
@@ -40977,9 +41006,9 @@ function ensureCloudflaredBackground(onInfo) {
40977
41006
  const archMap = { x64: "amd64", arm64: "arm64", arm: "arm" };
40978
41007
  const cfArch = archMap[arch2] ?? "amd64";
40979
41008
  try {
40980
- execSync27(`curl -fsSL "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${cfArch}" -o /tmp/cloudflared && chmod +x /tmp/cloudflared && mkdir -p "${homedir12()}/.local/bin" && mv /tmp/cloudflared "${homedir12()}/.local/bin/cloudflared"`, { stdio: "pipe", timeout: 6e4 });
40981
- if (!process.env.PATH?.includes(`${homedir12()}/.local/bin`)) {
40982
- process.env.PATH = `${homedir12()}/.local/bin:${process.env.PATH}`;
41009
+ execSync27(`curl -fsSL "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${cfArch}" -o /tmp/cloudflared && chmod +x /tmp/cloudflared && mkdir -p "${homedir13()}/.local/bin" && mv /tmp/cloudflared "${homedir13()}/.local/bin/cloudflared"`, { stdio: "pipe", timeout: 6e4 });
41010
+ if (!process.env.PATH?.includes(`${homedir13()}/.local/bin`)) {
41011
+ process.env.PATH = `${homedir13()}/.local/bin:${process.env.PATH}`;
40983
41012
  }
40984
41013
  if (hasCmd("cloudflared")) {
40985
41014
  log("cloudflared installed.");
@@ -41074,7 +41103,7 @@ async function createExpandedVariantAsync(baseModel, specs, sizeGB, kvBytesPerTo
41074
41103
  `PARAMETER num_predict ${numPredict}`,
41075
41104
  `PARAMETER stop "<|endoftext|>"`
41076
41105
  ].join("\n");
41077
- const modelDir2 = join54(homedir12(), ".open-agents", "models");
41106
+ const modelDir2 = join54(homedir13(), ".open-agents", "models");
41078
41107
  mkdirSync15(modelDir2, { recursive: true });
41079
41108
  const modelfilePath = join54(modelDir2, `Modelfile.${customName}`);
41080
41109
  writeFileSync16(modelfilePath, modelfileContent + "\n", "utf8");
@@ -41151,7 +41180,7 @@ async function ensureNeovim() {
41151
41180
  const platform6 = process.platform;
41152
41181
  const arch2 = process.arch;
41153
41182
  if (platform6 === "linux") {
41154
- const binDir = join54(homedir12(), ".local", "bin");
41183
+ const binDir = join54(homedir13(), ".local", "bin");
41155
41184
  const nvimDest = join54(binDir, "nvim");
41156
41185
  try {
41157
41186
  mkdirSync15(binDir, { recursive: true });
@@ -41223,7 +41252,7 @@ async function ensureNeovim() {
41223
41252
  }
41224
41253
  function ensurePathInShellRc(binDir) {
41225
41254
  const shell = process.env.SHELL ?? "";
41226
- const rcFile = shell.includes("zsh") ? join54(homedir12(), ".zshrc") : join54(homedir12(), ".bashrc");
41255
+ const rcFile = shell.includes("zsh") ? join54(homedir13(), ".zshrc") : join54(homedir13(), ".bashrc");
41227
41256
  try {
41228
41257
  const rcContent = existsSync37(rcFile) ? readFileSync28(rcFile, "utf8") : "";
41229
41258
  if (rcContent.includes(binDir))
@@ -43568,7 +43597,7 @@ __export(voice_exports, {
43568
43597
  });
43569
43598
  import { existsSync as existsSync41, mkdirSync as mkdirSync17, writeFileSync as writeFileSync18, readFileSync as readFileSync30, unlinkSync as unlinkSync9, readdirSync as readdirSync11, renameSync, statSync as statSync13 } from "node:fs";
43570
43599
  import { join as join57, dirname as dirname18 } from "node:path";
43571
- import { homedir as homedir13, tmpdir as tmpdir9, platform as platform3 } from "node:os";
43600
+ import { homedir as homedir14, tmpdir as tmpdir9, platform as platform3 } from "node:os";
43572
43601
  import { execSync as execSync29, spawn as nodeSpawn } from "node:child_process";
43573
43602
  import { createRequire } from "node:module";
43574
43603
  function sanitizeForTTS(text) {
@@ -43592,7 +43621,7 @@ function listVoiceModels() {
43592
43621
  }));
43593
43622
  }
43594
43623
  function voiceDir() {
43595
- return join57(homedir13(), ".open-agents", "voice");
43624
+ return join57(homedir14(), ".open-agents", "voice");
43596
43625
  }
43597
43626
  function modelsDir() {
43598
43627
  return join57(voiceDir(), "models");
@@ -44588,7 +44617,7 @@ var init_voice = __esm({
44588
44617
  }
44589
44618
  p = p.replace(/\\ /g, " ");
44590
44619
  if (p.startsWith("~/") || p === "~") {
44591
- p = join57(homedir13(), p.slice(1));
44620
+ p = join57(homedir14(), p.slice(1));
44592
44621
  }
44593
44622
  if (!existsSync41(p)) {
44594
44623
  return `File not found: ${p}
@@ -46628,6 +46657,29 @@ async function handleSlashCommand(input, ctx) {
46628
46657
  } else {
46629
46658
  renderInfo("No wallet configured. Ask the agent to create one via the nexus tool.");
46630
46659
  }
46660
+ } else if (sub === "name") {
46661
+ const { homedir: homedir19 } = __require("node:os");
46662
+ const { existsSync: ex, readFileSync: rf, writeFileSync: wf, mkdirSync: mkd } = __require("node:fs");
46663
+ const namePath = __require("node:path").join(homedir19(), ".open-agents", "agent-name");
46664
+ if (rest2) {
46665
+ const customName = rest2.replace(/[^a-zA-Z0-9_\-.\s]/g, "").trim().slice(0, 40);
46666
+ if (!customName) {
46667
+ renderError("Invalid name. Use alphanumeric characters, dashes, dots, underscores.");
46668
+ return "handled";
46669
+ }
46670
+ mkd(__require("node:path").dirname(namePath), { recursive: true });
46671
+ wf(namePath, customName, "utf8");
46672
+ renderInfo(`Agent name set to: ${c2.bold(customName)}`);
46673
+ renderInfo("Restart the nexus daemon (/nexus restart) for the change to take effect.");
46674
+ } else {
46675
+ if (ex(namePath)) {
46676
+ const current = rf(namePath, "utf8").trim();
46677
+ renderInfo(`Current agent name: ${c2.bold(current)}`);
46678
+ } else {
46679
+ renderInfo("No custom name set. Using deterministic mnemonic.");
46680
+ }
46681
+ renderInfo(`Set a custom name: /nexus name <your-name>`);
46682
+ }
46631
46683
  } else if (sub === "restart" || sub === "disconnect" || sub === "kill") {
46632
46684
  const nexusDir = ctx.repoRoot ? __require("node:path").join(ctx.repoRoot, ".oa", "nexus") : null;
46633
46685
  if (!nexusDir) {
@@ -49197,9 +49249,9 @@ async function handleVoiceMenu(ctx, save, hasLocal) {
49197
49249
  }
49198
49250
  const { basename: basename18, join: pathJoin } = await import("node:path");
49199
49251
  const { copyFileSync: copyFileSync2, mkdirSync: mkdirSync27, existsSync: exists } = await import("node:fs");
49200
- const { homedir: homedir18 } = await import("node:os");
49252
+ const { homedir: homedir19 } = await import("node:os");
49201
49253
  const modelName = basename18(onnxDrop.path, ".onnx").replace(/[^a-zA-Z0-9_-]/g, "-");
49202
- const destDir = pathJoin(homedir18(), ".open-agents", "voice", "models", modelName);
49254
+ const destDir = pathJoin(homedir19(), ".open-agents", "voice", "models", modelName);
49203
49255
  if (!exists(destDir))
49204
49256
  mkdirSync27(destDir, { recursive: true });
49205
49257
  copyFileSync2(onnxDrop.path, pathJoin(destDir, "model.onnx"));
@@ -50933,7 +50985,7 @@ var init_commands = __esm({
50933
50985
  import { existsSync as existsSync43, readFileSync as readFileSync32, readdirSync as readdirSync13 } from "node:fs";
50934
50986
  import { join as join59, basename as basename12 } from "node:path";
50935
50987
  import { execSync as execSync30 } from "node:child_process";
50936
- import { homedir as homedir15, platform as platform4, release } from "node:os";
50988
+ import { homedir as homedir16, platform as platform4, release } from "node:os";
50937
50989
  function getModelTier(modelName) {
50938
50990
  const m = modelName.toLowerCase();
50939
50991
  const sizeMatch = m.match(/\b(\d+)b\b/);
@@ -51020,7 +51072,7 @@ function loadMemoryContext(repoRoot) {
51020
51072
  if (legacyEntries)
51021
51073
  sections.push(legacyEntries);
51022
51074
  }
51023
- const globalMemDir = join59(homedir15(), ".open-agents", "memory");
51075
+ const globalMemDir = join59(homedir16(), ".open-agents", "memory");
51024
51076
  const globalEntries = loadMemoryDir(globalMemDir, "global");
51025
51077
  if (globalEntries)
51026
51078
  sections.push(globalEntries);
@@ -61177,7 +61229,7 @@ import { fileURLToPath as fileURLToPath12 } from "node:url";
61177
61229
  import { readFileSync as readFileSync39, writeFileSync as writeFileSync23, appendFileSync as appendFileSync4, rmSync as rmSync3, readdirSync as readdirSync19, mkdirSync as mkdirSync24 } from "node:fs";
61178
61230
  import { existsSync as existsSync50 } from "node:fs";
61179
61231
  import { execSync as execSync33 } from "node:child_process";
61180
- import { homedir as homedir16 } from "node:os";
61232
+ import { homedir as homedir17 } from "node:os";
61181
61233
  function formatTimeAgo(date) {
61182
61234
  const seconds = Math.floor((Date.now() - date.getTime()) / 1e3);
61183
61235
  if (seconds < 60)
@@ -63001,7 +63053,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
63001
63053
  const hits = allCompletions.filter((c3) => c3.toLowerCase().startsWith(lower));
63002
63054
  return [hits, line];
63003
63055
  }
63004
- const HISTORY_DIR = join67(homedir16(), ".open-agents");
63056
+ const HISTORY_DIR = join67(homedir17(), ".open-agents");
63005
63057
  const HISTORY_FILE = join67(HISTORY_DIR, "repl-history");
63006
63058
  const MAX_HISTORY_LINES = 500;
63007
63059
  let savedHistory = [];
@@ -64520,7 +64572,7 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
64520
64572
  } catch {
64521
64573
  }
64522
64574
  try {
64523
- const voiceDir2 = join67(homedir16(), ".open-agents", "voice");
64575
+ const voiceDir2 = join67(homedir17(), ".open-agents", "voice");
64524
64576
  const voicePidFiles = ["luxtts-daemon.pid", "piper-daemon.pid"];
64525
64577
  for (const pf of voicePidFiles) {
64526
64578
  const pidPath = join67(voiceDir2, pf);
@@ -66372,7 +66424,7 @@ __export(config_exports, {
66372
66424
  configCommand: () => configCommand
66373
66425
  });
66374
66426
  import { join as join70, resolve as resolve34 } from "node:path";
66375
- import { homedir as homedir17 } from "node:os";
66427
+ import { homedir as homedir18 } from "node:os";
66376
66428
  import { cwd as cwd3 } from "node:process";
66377
66429
  function redactIfSensitive(key, value) {
66378
66430
  if (SENSITIVE_KEYS.has(key) && typeof value === "string" && value.length > 0) {
@@ -66454,7 +66506,7 @@ function handleShow(opts, config) {
66454
66506
  }
66455
66507
  }
66456
66508
  printSection("Config File");
66457
- printInfo(`~/.open-agents/config.json (${join70(homedir17(), ".open-agents", "config.json")})`);
66509
+ printInfo(`~/.open-agents/config.json (${join70(homedir18(), ".open-agents", "config.json")})`);
66458
66510
  printSection("Priority Chain");
66459
66511
  printInfo(" 1. CLI flags (--model, --backend-url, etc.)");
66460
66512
  printInfo(" 2. Project .oa/settings.json (--local)");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.184.10",
3
+ "version": "0.184.12",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) \u2014 interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",