open-agents-ai 0.185.79 → 0.185.80
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 +93 -1
- 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
|
|
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();
|
|
@@ -67823,6 +67888,33 @@ async function handleRequest(req, res, ollamaUrl, verbose) {
|
|
|
67823
67888
|
return;
|
|
67824
67889
|
}
|
|
67825
67890
|
}
|
|
67891
|
+
if (pathname === "/v1/system" && method === "GET") {
|
|
67892
|
+
const os = __require("node:os");
|
|
67893
|
+
const { execSync: es } = __require("node:child_process");
|
|
67894
|
+
let gpus = [];
|
|
67895
|
+
try {
|
|
67896
|
+
const nv = es("nvidia-smi --query-gpu=name,memory.total --format=csv,noheader,nounits", { encoding: "utf8", timeout: 5e3, stdio: "pipe" });
|
|
67897
|
+
for (const line of nv.trim().split("\n")) {
|
|
67898
|
+
const [name, mem] = line.split(",").map((s) => s.trim());
|
|
67899
|
+
if (name && mem)
|
|
67900
|
+
gpus.push({ name, vram_gb: Math.round(parseInt(mem, 10) / 1024) });
|
|
67901
|
+
}
|
|
67902
|
+
} catch {
|
|
67903
|
+
}
|
|
67904
|
+
const totalVram = gpus.reduce((s, g) => s + g.vram_gb, 0);
|
|
67905
|
+
jsonResponse(res, 200, {
|
|
67906
|
+
gpu: gpus,
|
|
67907
|
+
total_vram_gb: totalVram,
|
|
67908
|
+
ram_gb: Math.round(os.totalmem() / 1024 ** 3),
|
|
67909
|
+
cpu: os.cpus()[0]?.model ?? "unknown",
|
|
67910
|
+
cores: os.cpus().length,
|
|
67911
|
+
platform: process.platform,
|
|
67912
|
+
node: process.version,
|
|
67913
|
+
// Model compatibility recommendations
|
|
67914
|
+
recommended_max_params: totalVram >= 80 ? "120B+" : totalVram >= 48 ? "70B" : totalVram >= 24 ? "27B" : totalVram >= 8 ? "9B" : "4B"
|
|
67915
|
+
});
|
|
67916
|
+
return;
|
|
67917
|
+
}
|
|
67826
67918
|
if (pathname === "/v1/chat" && method === "POST") {
|
|
67827
67919
|
if (!checkAuth(req, res, "run")) {
|
|
67828
67920
|
status = 401;
|
package/package.json
CHANGED