open-agents-ai 0.187.391 → 0.187.393

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/dist/index.js CHANGED
@@ -124793,7 +124793,7 @@ var require_snapshot_recorder = __commonJS({
124793
124793
  "../../../node_modules/undici/lib/mock/snapshot-recorder.js"(exports, module) {
124794
124794
  "use strict";
124795
124795
  var { writeFile: writeFile21, readFile: readFile22, mkdir: mkdir16 } = __require("node:fs/promises");
124796
- var { dirname: dirname33, resolve: resolve41 } = __require("node:path");
124796
+ var { dirname: dirname34, resolve: resolve41 } = __require("node:path");
124797
124797
  var { setTimeout: setTimeout3, clearTimeout: clearTimeout3 } = __require("node:timers");
124798
124798
  var { InvalidArgumentError, UndiciError } = require_errors2();
124799
124799
  var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
@@ -125024,7 +125024,7 @@ var require_snapshot_recorder = __commonJS({
125024
125024
  throw new InvalidArgumentError("Snapshot path is required");
125025
125025
  }
125026
125026
  const resolvedPath = resolve41(path5);
125027
- await mkdir16(dirname33(resolvedPath), { recursive: true });
125027
+ await mkdir16(dirname34(resolvedPath), { recursive: true });
125028
125028
  const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
125029
125029
  hash,
125030
125030
  snapshot
@@ -238674,15 +238674,15 @@ var init_ls = __esm({
238674
238674
  });
238675
238675
 
238676
238676
  // ../../../node_modules/@helia/unixfs/dist/src/commands/mkdir.js
238677
- async function mkdir5(parentCid, dirname33, blockstore, options2 = {}) {
238678
- if (dirname33.includes("/")) {
238677
+ async function mkdir5(parentCid, dirname34, blockstore, options2 = {}) {
238678
+ if (dirname34.includes("/")) {
238679
238679
  throw new InvalidParametersError4("Path must not have slashes");
238680
238680
  }
238681
238681
  const entry = await exporter2(parentCid, blockstore, options2);
238682
238682
  if (entry.type !== "directory") {
238683
238683
  throw new NotADirectoryError(`${parentCid.toString()} was not a UnixFS directory`);
238684
238684
  }
238685
- log16("creating %s", dirname33);
238685
+ log16("creating %s", dirname34);
238686
238686
  const metadata = new UnixFS({
238687
238687
  type: "directory",
238688
238688
  mode: options2.mode,
@@ -238698,9 +238698,9 @@ async function mkdir5(parentCid, dirname33, blockstore, options2 = {}) {
238698
238698
  await blockstore.put(emptyDirCid, buf);
238699
238699
  const [directory, pblink] = await Promise.all([
238700
238700
  cidToDirectory(parentCid, blockstore, options2),
238701
- cidToPBLink(emptyDirCid, dirname33, blockstore, options2)
238701
+ cidToPBLink(emptyDirCid, dirname34, blockstore, options2)
238702
238702
  ]);
238703
- log16("adding empty dir called %s to %c", dirname33, parentCid);
238703
+ log16("adding empty dir called %s to %c", dirname34, parentCid);
238704
238704
  const result = await addLink(directory, pblink, blockstore, {
238705
238705
  ...options2,
238706
238706
  allowOverwriting: options2.force
@@ -239199,8 +239199,8 @@ var init_unixfs2 = __esm({
239199
239199
  async *ls(cid, options2 = {}) {
239200
239200
  yield* ls(cid, this.components.blockstore, options2);
239201
239201
  }
239202
- async mkdir(cid, dirname33, options2 = {}) {
239203
- return mkdir5(cid, dirname33, this.components.blockstore, options2);
239202
+ async mkdir(cid, dirname34, options2 = {}) {
239203
+ return mkdir5(cid, dirname34, this.components.blockstore, options2);
239204
239204
  }
239205
239205
  async rm(cid, path5, options2 = {}) {
239206
239206
  return rm2(cid, path5, this.components.blockstore, options2);
@@ -470995,7 +470995,7 @@ var require_path_browserify = __commonJS({
470995
470995
  _makeLong: function _makeLong(path5) {
470996
470996
  return path5;
470997
470997
  },
470998
- dirname: function dirname33(path5) {
470998
+ dirname: function dirname34(path5) {
470999
470999
  assertPath(path5);
471000
471000
  if (path5.length === 0) return ".";
471001
471001
  var code8 = path5.charCodeAt(0);
@@ -529597,22 +529597,68 @@ __export(oa_directory_exports, {
529597
529597
  writeIndexMeta: () => writeIndexMeta
529598
529598
  });
529599
529599
  import { existsSync as existsSync57, mkdirSync as mkdirSync32, readFileSync as readFileSync44, writeFileSync as writeFileSync29, readdirSync as readdirSync14, statSync as statSync17, unlinkSync as unlinkSync14, openSync as openSync2, closeSync as closeSync2 } from "node:fs";
529600
- import { join as join75, relative as relative6, basename as basename13 } from "node:path";
529600
+ import { join as join75, relative as relative6, basename as basename13, dirname as dirname22 } from "node:path";
529601
529601
  import { homedir as homedir25 } from "node:os";
529602
+ function findGitRoot(startDir) {
529603
+ let dir = startDir;
529604
+ const visited = /* @__PURE__ */ new Set();
529605
+ while (dir && !visited.has(dir)) {
529606
+ visited.add(dir);
529607
+ if (existsSync57(join75(dir, ".git"))) return dir;
529608
+ const parent = join75(dir, "..");
529609
+ if (parent === dir) break;
529610
+ dir = parent;
529611
+ }
529612
+ return null;
529613
+ }
529614
+ function findNearestExistingGitignore(startDir, gitRoot) {
529615
+ let dir = startDir;
529616
+ const visited = /* @__PURE__ */ new Set();
529617
+ while (dir && !visited.has(dir)) {
529618
+ visited.add(dir);
529619
+ const candidate = join75(dir, ".gitignore");
529620
+ if (existsSync57(candidate)) return candidate;
529621
+ if (dir === gitRoot) break;
529622
+ const parent = join75(dir, "..");
529623
+ if (parent === dir) break;
529624
+ dir = parent;
529625
+ }
529626
+ return null;
529627
+ }
529628
+ function normalizeIgnoreRule(rule) {
529629
+ return rule.trim().replace(/\\/g, "/").replace(/^\.\//, "").replace(/^\/+/, "").replace(/\/+$/, "");
529630
+ }
529631
+ function ensureOaIgnored(repoRoot) {
529632
+ const gitRoot = findGitRoot(repoRoot);
529633
+ if (!gitRoot) return;
529634
+ const gitignorePath = findNearestExistingGitignore(repoRoot, gitRoot);
529635
+ if (!gitignorePath) return;
529636
+ const gitignoreDir = dirname22(gitignorePath);
529637
+ const relDir = relative6(gitignoreDir || ".", repoRoot).replace(/\\/g, "/");
529638
+ const ignorePattern = relDir && relDir !== "." ? `${relDir}/.oa/` : ".oa/";
529639
+ const content = readFileSync44(gitignorePath, "utf-8");
529640
+ const normalizedTarget = normalizeIgnoreRule(ignorePattern);
529641
+ const alreadyIgnored = content.split(/\r?\n/).some((line) => {
529642
+ const trimmed = line.trim();
529643
+ if (!trimmed || trimmed.startsWith("#")) return false;
529644
+ return normalizeIgnoreRule(trimmed) === normalizedTarget;
529645
+ });
529646
+ if (alreadyIgnored) return;
529647
+ writeFileSync29(
529648
+ gitignorePath,
529649
+ (content.trimEnd() ? `${content.trimEnd()}
529650
+ ` : "") + `${ignorePattern}
529651
+ `,
529652
+ "utf-8"
529653
+ );
529654
+ }
529602
529655
  function initOaDirectory(repoRoot) {
529603
529656
  const oaPath = join75(repoRoot, OA_DIR);
529604
529657
  for (const sub of SUBDIRS) {
529605
529658
  mkdirSync32(join75(oaPath, sub), { recursive: true });
529606
529659
  }
529607
529660
  try {
529608
- const gitignorePath = join75(repoRoot, ".gitignore");
529609
- const settingsPattern = ".oa/settings.json";
529610
- if (existsSync57(gitignorePath)) {
529611
- const content = readFileSync44(gitignorePath, "utf-8");
529612
- if (!content.includes(settingsPattern)) {
529613
- writeFileSync29(gitignorePath, content.trimEnd() + "\n" + settingsPattern + "\n", "utf-8");
529614
- }
529615
- }
529661
+ ensureOaIgnored(repoRoot);
529616
529662
  } catch {
529617
529663
  }
529618
529664
  return oaPath;
@@ -532325,6 +532371,8 @@ var init_status_bar = __esm({
532325
532371
  /** Current package version (shown in metrics row, rightmost) */
532326
532372
  _version = "";
532327
532373
  _updateLatest = null;
532374
+ _headerBackendType = "";
532375
+ _headerBackendUrl = "";
532328
532376
  // ── Voice & Nexus status (for header panel display) ─────────────────
532329
532377
  _voiceActive = false;
532330
532378
  _voiceModelId = "";
@@ -532341,6 +532389,59 @@ var init_status_bar = __esm({
532341
532389
  this._nexusStatus = status;
532342
532390
  if (this.active) this.refreshHeaderContent();
532343
532391
  }
532392
+ refreshHeaderPanels() {
532393
+ this._rebuildHeaderPanels();
532394
+ if (this.active) this.refreshHeaderContent();
532395
+ }
532396
+ refreshHeaderAndFooter() {
532397
+ this.refreshHeaderPanels();
532398
+ if (this.active) this.renderFooterPreserveCursor();
532399
+ }
532400
+ summarizeHeaderModelName() {
532401
+ const raw = this._modelName.trim();
532402
+ if (!raw) return "";
532403
+ const leaf = raw.split("/").pop() ?? raw;
532404
+ const familySource = leaf.split(":")[0]?.trim() || leaf;
532405
+ const paramMatch = raw.match(/(\d+(?:\.\d+)?\s*[bBmMkK])/);
532406
+ const param = paramMatch ? paramMatch[1].replace(/\s+/g, "").toLowerCase() : "";
532407
+ let summary = param && !familySource.toLowerCase().includes(param) ? `${familySource} ${param}` : familySource;
532408
+ if (summary.length > 18) {
532409
+ const compactBase = familySource.split(/[-_]/).filter(Boolean).slice(0, 2).join(" ") || familySource;
532410
+ summary = param && !compactBase.toLowerCase().includes(param) ? `${compactBase} ${param}` : compactBase;
532411
+ }
532412
+ return summary.length > 18 ? `${summary.slice(0, 17)}…` : summary;
532413
+ }
532414
+ summarizeHeaderTransport() {
532415
+ const backendType = this._headerBackendType;
532416
+ const backendUrl = this._headerBackendUrl;
532417
+ if (backendType === "nexus" || backendUrl.startsWith("peer://")) return "p2p";
532418
+ if (backendType === "fake") return "fake";
532419
+ if (!backendUrl) return "";
532420
+ if (backendUrl.includes("127.0.0.1") || backendUrl.includes("localhost") || backendUrl.includes("0.0.0.0")) {
532421
+ return "local";
532422
+ }
532423
+ return "remote";
532424
+ }
532425
+ buildHeaderVersionText() {
532426
+ const parts = [` OA v${this._version}`];
532427
+ const model = this.summarizeHeaderModelName();
532428
+ const transport = this.summarizeHeaderTransport();
532429
+ if (model) parts.push(model);
532430
+ if (transport) parts.push(transport);
532431
+ if (this._updateLatest) parts[parts.length - 1] += " ↑";
532432
+ return parts.join(" | ");
532433
+ }
532434
+ setBackendInfo(backendType, backendUrl) {
532435
+ this._headerBackendType = backendType;
532436
+ this._headerBackendUrl = backendUrl;
532437
+ this.refreshHeaderAndFooter();
532438
+ }
532439
+ setHeaderIdentity(modelName, backendType, backendUrl) {
532440
+ this._modelName = modelName;
532441
+ this._headerBackendType = backendType;
532442
+ this._headerBackendUrl = backendUrl;
532443
+ this.refreshHeaderAndFooter();
532444
+ }
532344
532445
  // ── Header Panel System ──────────────────────────────────────────────
532345
532446
  // Extensible dual-state (N-state) header: the content row inside the
532346
532447
  // ╭│╰ box cycles between registered panels via arrow buttons.
@@ -532362,7 +532463,7 @@ var init_status_bar = __esm({
532362
532463
  return this._headerPanels.length - 1;
532363
532464
  }
532364
532465
  /** Rebuild all header panels. Two categories are kept separate:
532365
- * - Category A: Version + menu buttons (help/voice/model/cohere)
532466
+ * - Category A: Version + menu buttons (help/voice/model/endpoint/sponsor)
532366
532467
  * - Category B: Systems (agents/voice status/nexus status)
532367
532468
  * Each category paginates independently across N pages. */
532368
532469
  _rebuildHeaderPanels() {
@@ -532378,14 +532479,13 @@ var init_status_bar = __esm({
532378
532479
  }
532379
532480
  return `\x1B]8;;${cmdPrefix}\x07\x1B[38;5;${fg3}m${label}\x1B]8;;\x07`;
532380
532481
  };
532381
- const verBase = ` OA v${this._version}`;
532382
- const verArrow = this._updateLatest ? " ↑" : "";
532383
- const verText = verBase + verArrow;
532482
+ const verText = this.buildHeaderVersionText();
532384
532483
  const menuBtns = [
532385
532484
  { cmd: "help", label: " help ", w: 6 },
532386
532485
  { cmd: "voice", label: " voice ", w: 7 },
532387
532486
  { cmd: "model", label: " model ", w: 7 },
532388
- { cmd: "cohere", label: " cohere ", w: 8 }
532487
+ { cmd: "endpoint", label: " endpoint ", w: 10 },
532488
+ { cmd: "sponsor", label: " sponsor ", w: 9 }
532389
532489
  ];
532390
532490
  const verW = verText.length;
532391
532491
  let menuPages = [];
@@ -532662,12 +532762,12 @@ var init_status_bar = __esm({
532662
532762
  /** Set the current package version for display in the metrics row */
532663
532763
  setVersion(version4) {
532664
532764
  this._version = version4;
532665
- if (this.active) this.renderFooterPreserveCursor();
532765
+ this.refreshHeaderAndFooter();
532666
532766
  }
532667
532767
  /** Mark that a newer version is available (renders clickable ↑ next to version) */
532668
532768
  setUpdateAvailable(latestVersion) {
532669
532769
  this._updateLatest = latestVersion;
532670
- if (this.active) this.renderHeaderButtons();
532770
+ this.refreshHeaderPanels();
532671
532771
  }
532672
532772
  /** Human expert speed ratio tracker */
532673
532773
  _speedTracker = new HumanSpeedTracker();
@@ -532720,8 +532820,7 @@ var init_status_bar = __esm({
532720
532820
  _modelName = "";
532721
532821
  /** Update active model name shown in the status bar */
532722
532822
  setModelName(name10) {
532723
- this._modelName = name10;
532724
- if (this.active) this.renderFooterPreserveCursor();
532823
+ this.setHeaderIdentity(name10, this._headerBackendType, this._headerBackendUrl);
532725
532824
  }
532726
532825
  /** Model capabilities — shown as emoji indicators on the status bar */
532727
532826
  _caps = {
@@ -535612,7 +535711,7 @@ __export(personaplex_exports, {
535612
535711
  stopPersonaPlex: () => stopPersonaPlex
535613
535712
  });
535614
535713
  import { existsSync as existsSync59, writeFileSync as writeFileSync30, readFileSync as readFileSync47, mkdirSync as mkdirSync33, copyFileSync as copyFileSync2, readdirSync as readdirSync15, statSync as statSync18 } from "node:fs";
535615
- import { join as join77, dirname as dirname22 } from "node:path";
535714
+ import { join as join77, dirname as dirname23 } from "node:path";
535616
535715
  import { homedir as homedir27 } from "node:os";
535617
535716
  import { execSync as execSync46, spawn as spawn19 } from "node:child_process";
535618
535717
  import { fileURLToPath as fileURLToPath13 } from "node:url";
@@ -536426,7 +536525,7 @@ function getShippedVoicesDir() {
536426
536525
  // repo root
536427
536526
  ];
536428
536527
  try {
536429
- const modDir = dirname22(fileURLToPath13(import.meta.url));
536528
+ const modDir = dirname23(fileURLToPath13(import.meta.url));
536430
536529
  candidates.push(join77(modDir, "..", "..", "..", "voices", "personaplex"));
536431
536530
  candidates.push(join77(modDir, "..", "..", "..", "..", "voices", "personaplex"));
536432
536531
  } catch {
@@ -539475,7 +539574,7 @@ import { existsSync as existsSync63, readFileSync as readFileSync49, writeFileSy
539475
539574
  import { join as join80 } from "node:path";
539476
539575
  import { homedir as homedir29 } from "node:os";
539477
539576
  import { fileURLToPath as fileURLToPath14 } from "node:url";
539478
- import { dirname as dirname23 } from "node:path";
539577
+ import { dirname as dirname24 } from "node:path";
539479
539578
  function getDaemonPort() {
539480
539579
  const env2 = process.env["OA_HOST"];
539481
539580
  if (env2) {
@@ -539524,7 +539623,7 @@ async function startDaemon() {
539524
539623
  }
539525
539624
  }
539526
539625
  if (!oaScript) {
539527
- const thisDir = dirname23(fileURLToPath14(import.meta.url));
539626
+ const thisDir = dirname24(fileURLToPath14(import.meta.url));
539528
539627
  const indexJs = join80(thisDir, "index.js");
539529
539628
  if (existsSync63(indexJs)) oaScript = indexJs;
539530
539629
  }
@@ -541371,7 +541470,7 @@ __export(voice_exports, {
541371
541470
  resetNarrationContext: () => resetNarrationContext
541372
541471
  });
541373
541472
  import { existsSync as existsSync66, mkdirSync as mkdirSync37, writeFileSync as writeFileSync34, readFileSync as readFileSync51, unlinkSync as unlinkSync17, readdirSync as readdirSync16, statSync as statSync19 } from "node:fs";
541374
- import { join as join83, dirname as dirname24 } from "node:path";
541473
+ import { join as join83, dirname as dirname25 } from "node:path";
541375
541474
  import { homedir as homedir30, tmpdir as tmpdir20, platform as platform4 } from "node:os";
541376
541475
  import { execSync as execSync49, spawn as nodeSpawn } from "node:child_process";
541377
541476
  import { createRequire as createRequire3 } from "node:module";
@@ -541428,7 +541527,7 @@ function luxttsInferScript() {
541428
541527
  function writeDetectTorchScript(targetPath) {
541429
541528
  if (existsSync66(targetPath)) return;
541430
541529
  try {
541431
- mkdirSync37(dirname24(targetPath), { recursive: true });
541530
+ mkdirSync37(dirname25(targetPath), { recursive: true });
541432
541531
  } catch {
541433
541532
  }
541434
541533
  const script = `#!/usr/bin/env python3
@@ -544335,12 +544434,12 @@ async function ensureVoiceDeps(ctx3) {
544335
544434
  if (res?.log) renderInfo2(res.log.split("\n").slice(-3).join(" ").slice(0, 200));
544336
544435
  }
544337
544436
  if (typeof mod2.getVenvPython === "function") {
544338
- const { dirname: dirname33 } = await import("node:path");
544437
+ const { dirname: dirname34 } = await import("node:path");
544339
544438
  const { existsSync: existsSync91 } = await import("node:fs");
544340
544439
  const venvPy = mod2.getVenvPython();
544341
544440
  if (existsSync91(venvPy)) {
544342
544441
  process.env.TRANSCRIBE_PYTHON = venvPy;
544343
- const venvBin = dirname33(venvPy);
544442
+ const venvBin = dirname34(venvPy);
544344
544443
  const sep2 = process.platform === "win32" ? ";" : ":";
544345
544444
  const cur = process.env.PATH || "";
544346
544445
  if (!cur.split(sep2).includes(venvBin)) {
@@ -550157,9 +550256,9 @@ async function handlePeerEndpoint(peerId, authKey, ctx3, local) {
550157
550256
  if (models.length > 0) {
550158
550257
  try {
550159
550258
  const { writeFileSync: writeFileSync51, mkdirSync: mkdirSync58 } = await import("node:fs");
550160
- const { join: join110, dirname: dirname33 } = await import("node:path");
550259
+ const { join: join110, dirname: dirname34 } = await import("node:path");
550161
550260
  const cachePath = join110(ctx3.repoRoot || process.cwd(), ".oa", "nexus", "peer-models-cache.json");
550162
- mkdirSync58(dirname33(cachePath), { recursive: true });
550261
+ mkdirSync58(dirname34(cachePath), { recursive: true });
550163
550262
  writeFileSync51(cachePath, JSON.stringify({
550164
550263
  peerId,
550165
550264
  cachedAt: (/* @__PURE__ */ new Date()).toISOString(),
@@ -550729,10 +550828,10 @@ async function handleUpdate(subcommand, ctx3) {
550729
550828
  try {
550730
550829
  const { createRequire: createRequire7 } = await import("node:module");
550731
550830
  const { fileURLToPath: fileURLToPath20 } = await import("node:url");
550732
- const { dirname: dirname33, join: join110 } = await import("node:path");
550831
+ const { dirname: dirname34, join: join110 } = await import("node:path");
550733
550832
  const { existsSync: existsSync91 } = await import("node:fs");
550734
550833
  const req2 = createRequire7(import.meta.url);
550735
- const thisDir = dirname33(fileURLToPath20(import.meta.url));
550834
+ const thisDir = dirname34(fileURLToPath20(import.meta.url));
550736
550835
  const candidates = [
550737
550836
  join110(thisDir, "..", "package.json"),
550738
550837
  join110(thisDir, "..", "..", "package.json"),
@@ -555846,7 +555945,7 @@ var init_types = __esm({
555846
555945
  // packages/cli/src/tui/p2p/secret-vault.ts
555847
555946
  import { createCipheriv as createCipheriv3, createDecipheriv as createDecipheriv3, randomBytes as randomBytes18, scryptSync as scryptSync2, createHash as createHash8 } from "node:crypto";
555848
555947
  import { readFileSync as readFileSync54, writeFileSync as writeFileSync37, existsSync as existsSync69, mkdirSync as mkdirSync40 } from "node:fs";
555849
- import { dirname as dirname25 } from "node:path";
555948
+ import { dirname as dirname26 } from "node:path";
555850
555949
  var PLACEHOLDER_PREFIX, PLACEHOLDER_SUFFIX, CIPHER_ALGO, SALT_LEN, IV_LEN, KEY_LEN, SecretVault;
555851
555950
  var init_secret_vault = __esm({
555852
555951
  "packages/cli/src/tui/p2p/secret-vault.ts"() {
@@ -556053,7 +556152,7 @@ var init_secret_vault = __esm({
556053
556152
  const encrypted = Buffer.concat([cipher.update(data, "utf8"), cipher.final()]);
556054
556153
  const tag = cipher.getAuthTag();
556055
556154
  const blob = Buffer.concat([salt, iv, tag, encrypted]);
556056
- const dir = dirname25(this.storePath);
556155
+ const dir = dirname26(this.storePath);
556057
556156
  if (!existsSync69(dir)) mkdirSync40(dir, { recursive: true });
556058
556157
  writeFileSync37(this.storePath, blob, { mode: 384 });
556059
556158
  }
@@ -559245,7 +559344,7 @@ var init_edit_history = __esm({
559245
559344
 
559246
559345
  // packages/cli/src/tui/promptLoader.ts
559247
559346
  import { readFileSync as readFileSync58, existsSync as existsSync73 } from "node:fs";
559248
- import { join as join91, dirname as dirname26 } from "node:path";
559347
+ import { join as join91, dirname as dirname27 } from "node:path";
559249
559348
  import { fileURLToPath as fileURLToPath15 } from "node:url";
559250
559349
  function loadPrompt3(promptPath, vars) {
559251
559350
  let content = cache7.get(promptPath);
@@ -559265,7 +559364,7 @@ var init_promptLoader3 = __esm({
559265
559364
  "packages/cli/src/tui/promptLoader.ts"() {
559266
559365
  "use strict";
559267
559366
  __filename5 = fileURLToPath15(import.meta.url);
559268
- __dirname7 = dirname26(__filename5);
559367
+ __dirname7 = dirname27(__filename5);
559269
559368
  devPath2 = join91(__dirname7, "..", "..", "prompts");
559270
559369
  publishedPath2 = join91(__dirname7, "..", "prompts");
559271
559370
  PROMPTS_DIR3 = existsSync73(devPath2) ? devPath2 : publishedPath2;
@@ -565184,7 +565283,7 @@ var init_audit_log = __esm({
565184
565283
  // packages/cli/src/api/disk-task-output.ts
565185
565284
  import { open } from "node:fs/promises";
565186
565285
  import { existsSync as existsSync81, mkdirSync as mkdirSync50, statSync as statSync24 } from "node:fs";
565187
- import { dirname as dirname28 } from "node:path";
565286
+ import { dirname as dirname29 } from "node:path";
565188
565287
  import * as fsConstants from "node:constants";
565189
565288
  var O_NOFOLLOW2, O_APPEND2, O_CREAT2, O_WRONLY2, OPEN_FLAGS_WRITE, OPEN_MODE, DiskTaskOutput;
565190
565289
  var init_disk_task_output = __esm({
@@ -565203,7 +565302,7 @@ var init_disk_task_output = __esm({
565203
565302
  fileSize = 0;
565204
565303
  constructor(outputPath) {
565205
565304
  this.path = outputPath;
565206
- mkdirSync50(dirname28(outputPath), { recursive: true });
565305
+ mkdirSync50(dirname29(outputPath), { recursive: true });
565207
565306
  }
565208
565307
  /** Queue content for async append. Non-blocking. */
565209
565308
  append(chunk) {
@@ -572668,7 +572767,7 @@ var init_profiles = __esm({
572668
572767
  // packages/cli/src/docker.ts
572669
572768
  import { execSync as execSync54, spawn as spawn24 } from "node:child_process";
572670
572769
  import { existsSync as existsSync86, mkdirSync as mkdirSync53, writeFileSync as writeFileSync46 } from "node:fs";
572671
- import { join as join103, resolve as resolve35, dirname as dirname29 } from "node:path";
572770
+ import { join as join103, resolve as resolve35, dirname as dirname30 } from "node:path";
572672
572771
  import { homedir as homedir38 } from "node:os";
572673
572772
  import { fileURLToPath as fileURLToPath16 } from "node:url";
572674
572773
  function getDockerDir() {
@@ -572679,7 +572778,7 @@ function getDockerDir() {
572679
572778
  } catch {
572680
572779
  }
572681
572780
  try {
572682
- const thisDir = dirname29(fileURLToPath16(import.meta.url));
572781
+ const thisDir = dirname30(fileURLToPath16(import.meta.url));
572683
572782
  return join103(thisDir, "..", "..", "..", "docker");
572684
572783
  } catch {
572685
572784
  }
@@ -573146,7 +573245,7 @@ import * as http5 from "node:http";
573146
573245
  import * as https3 from "node:https";
573147
573246
  import { createRequire as createRequire4 } from "node:module";
573148
573247
  import { fileURLToPath as fileURLToPath17 } from "node:url";
573149
- import { dirname as dirname30, join as join104, resolve as resolve36 } from "node:path";
573248
+ import { dirname as dirname31, join as join104, resolve as resolve36 } from "node:path";
573150
573249
  import { homedir as homedir39 } from "node:os";
573151
573250
  import { spawn as spawn25, execSync as execSync55 } from "node:child_process";
573152
573251
  import { mkdirSync as mkdirSync54, writeFileSync as writeFileSync47, readFileSync as readFileSync69, readdirSync as readdirSync29, existsSync as existsSync87, watch as fsWatch3 } from "node:fs";
@@ -573155,7 +573254,7 @@ import { createHash as createHash12 } from "node:crypto";
573155
573254
  function getVersion3() {
573156
573255
  try {
573157
573256
  const require3 = createRequire4(import.meta.url);
573158
- const thisDir = dirname30(fileURLToPath17(import.meta.url));
573257
+ const thisDir = dirname31(fileURLToPath17(import.meta.url));
573159
573258
  const candidates = [
573160
573259
  join104(thisDir, "..", "package.json"),
573161
573260
  join104(thisDir, "..", "..", "package.json"),
@@ -574942,7 +575041,7 @@ async function handleV1Update(req2, res, requestId) {
574942
575041
  }, { subject: req2._authUser ?? "anonymous" });
574943
575042
  const fs4 = __require("node:fs");
574944
575043
  const nodeBin = process.execPath;
574945
- const nodeDir = dirname30(nodeBin);
575044
+ const nodeDir = dirname31(nodeBin);
574946
575045
  const { execSync: es } = __require("node:child_process");
574947
575046
  const isWin2 = process.platform === "win32";
574948
575047
  let npmBin = "";
@@ -574957,7 +575056,7 @@ async function handleV1Update(req2, res, requestId) {
574957
575056
  const dir = join104(homedir39(), ".open-agents");
574958
575057
  fs4.mkdirSync(dir, { recursive: true });
574959
575058
  const logFd = fs4.openSync(logPath2, "w");
574960
- const npmPrefix = dirname30(nodeDir);
575059
+ const npmPrefix = dirname31(nodeDir);
574961
575060
  let globalBinDir = "";
574962
575061
  try {
574963
575062
  if (isWin2) {
@@ -579071,7 +579170,7 @@ ${recentTurns}`
579071
579170
 
579072
579171
  // packages/cli/src/tui/interactive.ts
579073
579172
  import { cwd } from "node:process";
579074
- import { resolve as resolve37, join as join105, dirname as dirname31, extname as extname12 } from "node:path";
579173
+ import { resolve as resolve37, join as join105, dirname as dirname32, extname as extname12 } from "node:path";
579075
579174
  import { createRequire as createRequire5 } from "node:module";
579076
579175
  import { fileURLToPath as fileURLToPath18 } from "node:url";
579077
579176
  import { readFileSync as readFileSync70, writeFileSync as writeFileSync48, appendFileSync as appendFileSync6, rmSync as rmSync5, readdirSync as readdirSync30, mkdirSync as mkdirSync55 } from "node:fs";
@@ -579091,7 +579190,7 @@ function formatTimeAgo(date) {
579091
579190
  function getVersion4() {
579092
579191
  try {
579093
579192
  const require3 = createRequire5(import.meta.url);
579094
- const thisDir = dirname31(fileURLToPath18(import.meta.url));
579193
+ const thisDir = dirname32(fileURLToPath18(import.meta.url));
579095
579194
  const candidates = [
579096
579195
  join105(thisDir, "..", "package.json"),
579097
579196
  join105(thisDir, "..", "..", "package.json"),
@@ -581662,7 +581761,7 @@ ${opts.systemPromptAddition}` : `Working directory: ${repoRoot}`;
581662
581761
  statusBar.setCapabilities(caps);
581663
581762
  }).catch(() => {
581664
581763
  });
581665
- statusBar.setModelName(config.model);
581764
+ statusBar.setHeaderIdentity(config.model, config.backendType, config.backendUrl);
581666
581765
  const provider = detectProvider(config.backendUrl);
581667
581766
  const costTracker = new CostTracker(provider.id);
581668
581767
  const sessionMetrics = new SessionMetrics();
@@ -582561,6 +582660,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
582561
582660
  currentConfig.backendUrl = best.tunnelUrl;
582562
582661
  currentConfig.apiKey = bestNoAuth ? "" : best.authKey;
582563
582662
  currentConfig.backendType = "openai";
582663
+ statusBar.setBackendInfo(currentConfig.backendType, currentConfig.backendUrl);
582564
582664
  setTimeout(() => {
582565
582665
  if (statusBar.isActive) {
582566
582666
  writeContent(() => renderInfo2(`Connected to sponsored endpoint: ${best.name}`));
@@ -582745,7 +582845,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
582745
582845
  sessionMetrics,
582746
582846
  setModel(model) {
582747
582847
  currentConfig = { ...currentConfig, model };
582748
- statusBar.setModelName(model);
582848
+ statusBar.setHeaderIdentity(model, currentConfig.backendType, currentConfig.backendUrl);
582749
582849
  },
582750
582850
  setVerbose(verbose) {
582751
582851
  currentConfig = { ...currentConfig, verbose };
@@ -582757,6 +582857,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
582757
582857
  backendType,
582758
582858
  ...apiKey !== void 0 ? { apiKey } : {}
582759
582859
  };
582860
+ statusBar.setBackendInfo(backendType, url);
582760
582861
  const newProvider = detectProvider(url);
582761
582862
  costTracker.setProvider(newProvider.id);
582762
582863
  const isPeer = url.startsWith("peer://");
@@ -585047,6 +585148,7 @@ ${c3.dim("(Use /quit to exit)")}
585047
585148
  }
585048
585149
  async function runWithTUI(task, config, repoPath, callbacks) {
585049
585150
  const repoRoot = resolve37(repoPath ?? cwd());
585151
+ initOaDirectory(repoRoot);
585050
585152
  const needsSetup = isFirstRun() || !await isModelAvailable(config);
585051
585153
  if (needsSetup && config.backendType === "ollama") {
585052
585154
  const setupModel = await runSetupWizard(config);
@@ -586400,7 +586502,7 @@ init_typed_node_events();
586400
586502
  import { parseArgs as nodeParseArgs2 } from "node:util";
586401
586503
  import { createRequire as createRequire6 } from "node:module";
586402
586504
  import { fileURLToPath as fileURLToPath19 } from "node:url";
586403
- import { dirname as dirname32, join as join109 } from "node:path";
586505
+ import { dirname as dirname33, join as join109 } from "node:path";
586404
586506
 
586405
586507
  // packages/cli/src/cli.ts
586406
586508
  init_typed_node_events();
@@ -586508,7 +586610,7 @@ init_output();
586508
586610
  function getVersion5() {
586509
586611
  try {
586510
586612
  const require3 = createRequire6(import.meta.url);
586511
- const pkgPath = join109(dirname32(fileURLToPath19(import.meta.url)), "..", "package.json");
586613
+ const pkgPath = join109(dirname33(fileURLToPath19(import.meta.url)), "..", "package.json");
586512
586614
  const pkg = require3(pkgPath);
586513
586615
  return pkg.version;
586514
586616
  } catch {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.391",
3
+ "version": "0.187.393",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "open-agents-ai",
9
- "version": "0.187.391",
9
+ "version": "0.187.393",
10
10
  "hasInstallScript": true,
11
11
  "license": "CC-BY-NC-4.0",
12
12
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.391",
3
+ "version": "0.187.393",
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",