open-agents-ai 0.185.79 → 0.185.81

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 +102 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -65508,6 +65508,13 @@ body {
65508
65508
  outline: none;
65509
65509
  margin-bottom: 12px;
65510
65510
  }
65511
+ /* WO-E21: Responsive design */
65512
+ @media (max-width: 768px) {
65513
+ #workspace-sidebar { position:fixed !important; top:0; left:0; bottom:0; z-index:50; width:80vw !important; box-shadow:4px 0 20px rgba(0,0,0,0.5); }
65514
+ #header select { display:none; }
65515
+ #header .key-btn:first-of-type { display:none; }
65516
+ .tab { padding:6px 10px !important; font-size:0.6rem !important; }
65517
+ }
65511
65518
  #key-modal .modal button {
65512
65519
  background: #2a2a30;
65513
65520
  border: 1px solid #b2920a;
@@ -65527,6 +65534,8 @@ body {
65527
65534
  <span class="accent">OA</span>
65528
65535
  <span class="status" id="status">connecting...</span>
65529
65536
  <select id="model-select"><option>loading...</option></select>
65537
+ <button class="key-btn" onclick="toggleWorkspace()" title="Toggle workspace sidebar">files</button>
65538
+ <button class="key-btn" id="sandbox-toggle" onclick="toggleSandbox()" title="Toggle Docker sandbox" style="opacity:0.5">sandbox: off</button>
65530
65539
  <button class="key-btn" id="key-btn" title="Set API key">key</button>
65531
65540
  </div>
65532
65541
 
@@ -65542,7 +65551,17 @@ body {
65542
65551
  <button class="tab" onclick="switchTab('activity')" id="tab-activity" style="background:none;border:none;border-bottom:2px solid transparent;color:#555;padding:6px 16px;font-family:inherit;font-size:0.7rem;cursor:pointer">activity</button>
65543
65552
  <span id="token-counter" style="margin-left:auto;font-size:0.6rem;color:#555">0 tokens</span>
65544
65553
  </div>
65545
- <div id="conversation"></div>
65554
+ <div style="display:flex;flex:1;overflow:hidden">
65555
+ <div id="workspace-sidebar" style="display:none;width:250px;background:#1e1e22;border-right:1px solid #2a2a30;overflow-y:auto;padding:8px;flex-shrink:0;font-size:0.7rem">
65556
+ <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:8px">
65557
+ <span style="color:#b2920a;font-size:0.7rem;font-weight:bold">Workspace</span>
65558
+ <button onclick="toggleWorkspace()" style="background:none;border:none;color:#555;cursor:pointer;font-size:0.8rem">x</button>
65559
+ </div>
65560
+ <div id="workspace-cwd" style="color:#555;font-size:0.6rem;margin-bottom:8px;word-break:break-all"></div>
65561
+ <div id="workspace-tree" style="color:#b0b0b0"></div>
65562
+ </div>
65563
+ <div id="conversation" style="flex:1;overflow-y:auto;padding:12px 16px;display:flex;flex-direction:column;gap:4px"></div>
65564
+ </div>
65546
65565
  <div id="agent-panel" style="display:none;flex:1;overflow-y:auto;padding:12px 16px">
65547
65566
  <textarea id="agent-task" placeholder="Describe the task for the agent..." style="width:100%;min-height:80px;background:#2a2a30;border:1px solid #3a3a42;border-radius:3px;padding:8px 12px;color:#b0b0b0;font-family:inherit;font-size:0.82rem;resize:vertical;outline:none;margin-bottom:8px"></textarea>
65548
65567
  <div style="display:flex;gap:8px;margin-bottom:12px;align-items:center">
@@ -66065,6 +66084,25 @@ async function loadDashboard() {
66065
66084
  '<div style="color:#555;font-size:0.6rem">VERSION</div>' +
66066
66085
  '<div style="color:#b0b0b0;font-size:0.8rem">' + d.version + '</div></div>';
66067
66086
  } catch {}
66087
+ // System info + model recommendations
66088
+ try {
66089
+ const sr = await fetch('/v1/system', { headers: headers() });
66090
+ const sys = await sr.json();
66091
+ const gpuHtml = (sys.gpu || []).map(g => g.name + ' (' + g.vram_gb + 'GB)').join(', ') || 'No GPU detected';
66092
+ const healthEl = document.getElementById('dashboard-health');
66093
+ healthEl.innerHTML +=
66094
+ '<div style="background:#1e1e22;border:1px solid #2a2a30;border-radius:3px;padding:8px 12px;flex:1;min-width:120px">' +
66095
+ '<div style="color:#555;font-size:0.6rem">GPU</div>' +
66096
+ '<div style="color:#b0b0b0;font-size:0.7rem">' + gpuHtml + '</div></div>' +
66097
+ '<div style="background:#1e1e22;border:1px solid #2a2a30;border-radius:3px;padding:8px 12px;flex:1;min-width:120px">' +
66098
+ '<div style="color:#555;font-size:0.6rem">RAM</div>' +
66099
+ '<div style="color:#b0b0b0;font-size:0.8rem">' + sys.ram_gb + 'GB</div></div>' +
66100
+ '<div style="background:#1e1e22;border:1px solid #2a2a30;border-radius:3px;padding:8px 12px;flex:1;min-width:120px">' +
66101
+ '<div style="color:#555;font-size:0.6rem">MAX MODEL</div>' +
66102
+ '<div style="color:#b2920a;font-size:0.8rem">' + sys.recommended_max_params + '</div></div>';
66103
+ // Store for model badges
66104
+ window._sysMaxParams = sys.recommended_max_params;
66105
+ } catch {}
66068
66106
  // Usage \u2014 per-provider breakdown with persistent totals
66069
66107
  try {
66070
66108
  const r = await fetch('/v1/usage', { headers: headers() });
@@ -66124,6 +66162,33 @@ async function loadJobs() {
66124
66162
  } catch { list.innerHTML = '<div style="color:#ff4444">Failed to load jobs</div>'; }
66125
66163
  }
66126
66164
 
66165
+ // Workspace sidebar
66166
+ function toggleWorkspace() {
66167
+ const sb = document.getElementById('workspace-sidebar');
66168
+ sb.style.display = sb.style.display === 'none' ? 'block' : 'none';
66169
+ if (sb.style.display === 'block') loadWorkspaceTree();
66170
+ }
66171
+ async function loadWorkspaceTree() {
66172
+ try {
66173
+ const r = await fetch('/v1/system', { headers: headers() });
66174
+ const d = await r.json();
66175
+ document.getElementById('workspace-cwd').textContent = d.cwd || process.cwd?.() || '.';
66176
+ } catch {}
66177
+ // Placeholder tree \u2014 full implementation requires a directory listing endpoint
66178
+ document.getElementById('workspace-tree').innerHTML =
66179
+ '<div style="color:#555;font-size:0.65rem">File tree requires /v1/files endpoint (future WO)</div>';
66180
+ }
66181
+
66182
+ // Docker sandbox toggle
66183
+ let sandboxMode = 'none';
66184
+ function toggleSandbox() {
66185
+ sandboxMode = sandboxMode === 'none' ? 'container' : 'none';
66186
+ const btn = document.getElementById('sandbox-toggle');
66187
+ btn.textContent = 'sandbox: ' + (sandboxMode === 'none' ? 'off' : 'docker');
66188
+ btn.style.opacity = sandboxMode === 'none' ? '0.5' : '1';
66189
+ btn.style.borderColor = sandboxMode === 'none' ? '#3a3a42' : '#b2920a';
66190
+ }
66191
+
66127
66192
  // Init
66128
66193
  checkHealth();
66129
66194
  loadModels();
@@ -66140,7 +66205,12 @@ var init_web_ui = __esm({
66140
66205
  });
66141
66206
 
66142
66207
  // packages/cli/dist/api/logger.js
66208
+ function setQuiet(quiet) {
66209
+ _quiet = quiet;
66210
+ }
66143
66211
  function log(level, fields) {
66212
+ if (_quiet)
66213
+ return;
66144
66214
  if (LEVEL_NUM[level] > LEVEL_NUM[configuredLevel])
66145
66215
  return;
66146
66216
  if (useJson) {
@@ -66156,7 +66226,7 @@ function log(level, fields) {
66156
66226
  function logRequest(fields) {
66157
66227
  log("info", fields);
66158
66228
  }
66159
- var LEVEL_NUM, configuredLevel, useJson;
66229
+ var LEVEL_NUM, configuredLevel, useJson, _quiet;
66160
66230
  var init_logger = __esm({
66161
66231
  "packages/cli/dist/api/logger.js"() {
66162
66232
  "use strict";
@@ -66168,6 +66238,7 @@ var init_logger = __esm({
66168
66238
  return "info";
66169
66239
  })();
66170
66240
  useJson = (process.env["OA_LOG_FORMAT"] || "json").toLowerCase() !== "text";
66241
+ _quiet = false;
66171
66242
  }
66172
66243
  });
66173
66244
 
@@ -67823,6 +67894,33 @@ async function handleRequest(req, res, ollamaUrl, verbose) {
67823
67894
  return;
67824
67895
  }
67825
67896
  }
67897
+ if (pathname === "/v1/system" && method === "GET") {
67898
+ const os = __require("node:os");
67899
+ const { execSync: es } = __require("node:child_process");
67900
+ let gpus = [];
67901
+ try {
67902
+ const nv = es("nvidia-smi --query-gpu=name,memory.total --format=csv,noheader,nounits", { encoding: "utf8", timeout: 5e3, stdio: "pipe" });
67903
+ for (const line of nv.trim().split("\n")) {
67904
+ const [name, mem] = line.split(",").map((s) => s.trim());
67905
+ if (name && mem)
67906
+ gpus.push({ name, vram_gb: Math.round(parseInt(mem, 10) / 1024) });
67907
+ }
67908
+ } catch {
67909
+ }
67910
+ const totalVram = gpus.reduce((s, g) => s + g.vram_gb, 0);
67911
+ jsonResponse(res, 200, {
67912
+ gpu: gpus,
67913
+ total_vram_gb: totalVram,
67914
+ ram_gb: Math.round(os.totalmem() / 1024 ** 3),
67915
+ cpu: os.cpus()[0]?.model ?? "unknown",
67916
+ cores: os.cpus().length,
67917
+ platform: process.platform,
67918
+ node: process.version,
67919
+ // Model compatibility recommendations
67920
+ recommended_max_params: totalVram >= 80 ? "120B+" : totalVram >= 48 ? "70B" : totalVram >= 24 ? "27B" : totalVram >= 8 ? "9B" : "4B"
67921
+ });
67922
+ return;
67923
+ }
67826
67924
  if (pathname === "/v1/chat" && method === "POST") {
67827
67925
  if (!checkAuth(req, res, "run")) {
67828
67926
  status = 401;
@@ -68142,6 +68240,8 @@ async function handleRequest(req, res, ollamaUrl, verbose) {
68142
68240
  }
68143
68241
  }
68144
68242
  function startApiServer(options = {}) {
68243
+ if (options.quiet)
68244
+ setQuiet(true);
68145
68245
  const log2 = options.quiet ? (_msg) => {
68146
68246
  } : (msg) => process.stderr.write(msg);
68147
68247
  let host = "127.0.0.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.185.79",
3
+ "version": "0.185.81",
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",