open-agents-ai 0.187.300 → 0.187.301

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 +28 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -297407,6 +297407,13 @@ async function handleSlashCommand(input, ctx3) {
297407
297407
  return "handled";
297408
297408
  }
297409
297409
  process.env["OA_ACCESS"] = val2;
297410
+ if (val2 === "any" && !process.env["OA_API_KEY"]) {
297411
+ const { randomBytes: randomBytes23 } = await import("node:crypto");
297412
+ const apiKey = randomBytes23(16).toString("hex");
297413
+ process.env["OA_API_KEY"] = apiKey;
297414
+ renderInfo2(`Generated API key: ${c3.bold(c3.yellow(apiKey))}`);
297415
+ renderInfo2("Use the Web UI ‘key’ button to paste this token, or set Authorization: Bearer <key> in your client.");
297416
+ }
297410
297417
  if (hasLocal2) {
297411
297418
  ctx4.saveLocalSettings({ oaAccess: val2 });
297412
297419
  } else {
@@ -297436,6 +297443,13 @@ async function handleSlashCommand(input, ctx3) {
297436
297443
  return "handled";
297437
297444
  }
297438
297445
  process.env["OA_ACCESS"] = val;
297446
+ if (val === "any" && !process.env["OA_API_KEY"]) {
297447
+ const { randomBytes: randomBytes23 } = await import("node:crypto");
297448
+ const apiKey = randomBytes23(16).toString("hex");
297449
+ process.env["OA_API_KEY"] = apiKey;
297450
+ renderInfo2(`Generated API key: ${c3.bold(c3.yellow(apiKey))}`);
297451
+ renderInfo2("Use the Web UI ‘key’ button to paste this token, or set Authorization: Bearer <key> in your client.");
297452
+ }
297439
297453
  if (hasLocal) {
297440
297454
  ctx3.saveLocalSettings({ oaAccess: val });
297441
297455
  } else {
@@ -320871,6 +320885,20 @@ async function sendMessage() {
320871
320885
  signal: chatAbortController.signal,
320872
320886
  });
320873
320887
 
320888
+ // Auth prompt on 403 — open the key modal for a clean ingress
320889
+ if (response.status === 401 || response.status === 403) {
320890
+ streaming = false;
320891
+ chatAbortController = null;
320892
+ document.getElementById('send-btn').style.display = 'inline-block';
320893
+ document.getElementById('stop-btn').style.display = 'none';
320894
+ contentDiv.innerHTML = '<div style="background:#2a1e1e;border-left:3px solid #ffcc44;color:#ffcc44;padding:6px 10px 6px 14px;margin:3px 0;font-family:inherit">' +
320895
+ '<div style="color:#ffcc44;font-size:0.6rem;text-transform:uppercase;letter-spacing:0.08em;margin-bottom:2px">▸ auth required</div>' +
320896
+ '<div style="color:#ffe08a">Remote access requires an API key. Click the “key” button in the header and paste your token.</div>' +
320897
+ '</div>';
320898
+ try { document.getElementById('key-modal').classList.add('visible'); } catch {}
320899
+ return;
320900
+ }
320901
+
320874
320902
  // Session continuity — capture session_id from BOTH the response header
320875
320903
  // (set on SSE paths) and the JSON body (set on non-streaming paths).
320876
320904
  // Without this fallback, every message could start a fresh session and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.300",
3
+ "version": "0.187.301",
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",