open-agents-ai 0.186.1 → 0.186.3
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 +40 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25798,6 +25798,8 @@ var init_agenticRunner = __esm({
|
|
|
25798
25798
|
// window catches oscillation patterns (success → ENOENT → success → ENOENT)
|
|
25799
25799
|
// that the consecutive counter misses.
|
|
25800
25800
|
_consecutiveEnoent = 0;
|
|
25801
|
+
_assistantTextEmitted = false;
|
|
25802
|
+
// WO-E26: prevent double-emit
|
|
25801
25803
|
_recentEnoents = [];
|
|
25802
25804
|
// sliding window of last 8 tool calls
|
|
25803
25805
|
// -- Session Checkpointing (Priority 5) --
|
|
@@ -26211,7 +26213,7 @@ TASK: ${task}` : task;
|
|
|
26211
26213
|
let completed = false;
|
|
26212
26214
|
let summary = "";
|
|
26213
26215
|
let bruteForceCycle = 0;
|
|
26214
|
-
|
|
26216
|
+
this._assistantTextEmitted = false;
|
|
26215
26217
|
let consecutiveTextOnly = 0;
|
|
26216
26218
|
const MAX_CONSECUTIVE_TEXT_ONLY = 3;
|
|
26217
26219
|
let narratedToolCallCount = 0;
|
|
@@ -26868,9 +26870,9 @@ Then use file_read on individual FILES inside it.`);
|
|
|
26868
26870
|
if (tc.name === "task_complete") {
|
|
26869
26871
|
completed = true;
|
|
26870
26872
|
summary = tc.arguments.summary || "";
|
|
26871
|
-
if (summary && !
|
|
26873
|
+
if (summary && !this._assistantTextEmitted) {
|
|
26872
26874
|
this.emit({ type: "assistant_text", content: summary, turn, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
26873
|
-
|
|
26875
|
+
this._assistantTextEmitted = true;
|
|
26874
26876
|
}
|
|
26875
26877
|
break;
|
|
26876
26878
|
}
|
|
@@ -27224,9 +27226,9 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
|
|
|
27224
27226
|
if (tc.name === "task_complete") {
|
|
27225
27227
|
completed = true;
|
|
27226
27228
|
summary = tc.arguments.summary || "";
|
|
27227
|
-
if (summary && !
|
|
27229
|
+
if (summary && !this._assistantTextEmitted) {
|
|
27228
27230
|
this.emit({ type: "assistant_text", content: summary, turn, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
27229
|
-
|
|
27231
|
+
this._assistantTextEmitted = true;
|
|
27230
27232
|
}
|
|
27231
27233
|
break;
|
|
27232
27234
|
}
|
|
@@ -28840,7 +28842,7 @@ ${description}`
|
|
|
28840
28842
|
const cleanContent = content.replace(/<think>[\s\S]*?<\/think>/g, "").trim();
|
|
28841
28843
|
if (cleanContent) {
|
|
28842
28844
|
this.emit({ type: "assistant_text", content: cleanContent, turn, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
28843
|
-
|
|
28845
|
+
this._assistantTextEmitted = true;
|
|
28844
28846
|
}
|
|
28845
28847
|
const hadThinking = content.includes("<think>") && content.includes("</think>");
|
|
28846
28848
|
const thinkOnlyResponse = hadThinking && !cleanContent;
|
|
@@ -65553,6 +65555,7 @@ body {
|
|
|
65553
65555
|
<div id="header">
|
|
65554
65556
|
<span class="accent">OA</span>
|
|
65555
65557
|
<span class="status" id="status">connecting...</span>
|
|
65558
|
+
<span id="update-btn" style="display:none;background:#3a2a10;border:1px solid #b2920a;color:#b2920a;padding:2px 8px;border-radius:3px;font-family:inherit;font-size:0.6rem;cursor:pointer" onclick="doUpdate()">update</span>
|
|
65556
65559
|
<select id="model-select"><option>loading...</option></select>
|
|
65557
65560
|
<button class="key-btn" onclick="toggleWorkspace()" title="Toggle workspace sidebar">files</button>
|
|
65558
65561
|
<button class="key-btn" id="sandbox-toggle" onclick="toggleSandbox()" title="Toggle Docker sandbox" style="opacity:0.5">sandbox: off</button>
|
|
@@ -65570,19 +65573,18 @@ body {
|
|
|
65570
65573
|
<button class="tab" onclick="switchTab('config')" id="tab-config" style="background:none;border:none;border-bottom:2px solid transparent;color:#555;padding:6px 16px;font-family:inherit;font-size:0.7rem;cursor:pointer">config</button>
|
|
65571
65574
|
<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>
|
|
65572
65575
|
<span id="sys-metrics" style="margin-left:auto;font-size:0.6rem;color:#555"></span>
|
|
65573
|
-
<span id="update-btn" style="display:none;background:#3a2a10;border:1px solid #b2920a;color:#b2920a;padding:2px 8px;border-radius:3px;font-family:inherit;font-size:0.6rem;cursor:pointer" onclick="doUpdate()">update</span>
|
|
65574
65576
|
<span id="token-counter" style="font-size:0.6rem;color:#555">0 tokens</span>
|
|
65575
65577
|
</div>
|
|
65576
|
-
<div style="display:flex;flex:1;overflow:hidden">
|
|
65577
|
-
<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">
|
|
65578
|
-
|
|
65579
|
-
|
|
65580
|
-
|
|
65578
|
+
<div id="chat-container" style="display:flex;flex:1;overflow:hidden">
|
|
65579
|
+
<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">
|
|
65580
|
+
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:8px">
|
|
65581
|
+
<span style="color:#b2920a;font-size:0.7rem;font-weight:bold">Workspace</span>
|
|
65582
|
+
<button onclick="toggleWorkspace()" style="background:none;border:none;color:#555;cursor:pointer;font-size:0.8rem">x</button>
|
|
65583
|
+
</div>
|
|
65584
|
+
<div id="workspace-cwd" style="color:#555;font-size:0.6rem;margin-bottom:8px;word-break:break-all"></div>
|
|
65585
|
+
<div id="workspace-tree" style="color:#b0b0b0"></div>
|
|
65581
65586
|
</div>
|
|
65582
|
-
<div id="
|
|
65583
|
-
<div id="workspace-tree" style="color:#b0b0b0"></div>
|
|
65584
|
-
</div>
|
|
65585
|
-
<div id="conversation" style="flex:1;overflow-y:auto;padding:12px 16px;display:flex;flex-direction:column;gap:4px"></div>
|
|
65587
|
+
<div id="conversation" style="flex:1;overflow-y:auto;padding:12px 16px;display:flex;flex-direction:column;gap:4px"></div>
|
|
65586
65588
|
</div>
|
|
65587
65589
|
<div id="agent-panel" style="display:none;flex:1;overflow-y:auto;padding:12px 16px">
|
|
65588
65590
|
<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>
|
|
@@ -65851,21 +65853,35 @@ async function sendMessage() {
|
|
|
65851
65853
|
messages.push({ role: 'assistant', content: fullContent });
|
|
65852
65854
|
updateTokenCounter(fullContent.split(/\\s+/).length * 1.3 | 0);
|
|
65853
65855
|
|
|
65854
|
-
// Final render: content + collapsible tools
|
|
65856
|
+
// Final render: content + collapsible tools + metadata
|
|
65855
65857
|
contentDiv.innerHTML = renderMarkdown(fullContent);
|
|
65856
65858
|
|
|
65857
|
-
//
|
|
65859
|
+
// Metadata bar: turns, tokens, duration (always shown, compact)
|
|
65860
|
+
if (metaInfo) {
|
|
65861
|
+
const metaBar = document.createElement('div');
|
|
65862
|
+
metaBar.style.cssText = 'margin:6px 0 2px;padding:4px 8px;background:#1e1e22;border-radius:3px;font-size:0.6rem;color:#555;display:flex;gap:12px;flex-wrap:wrap';
|
|
65863
|
+
const parts = [];
|
|
65864
|
+
if (metaInfo.turns) parts.push(metaInfo.turns + ' turn' + (metaInfo.turns > 1 ? 's' : ''));
|
|
65865
|
+
if (metaInfo.toolCalls) parts.push(metaInfo.toolCalls + ' tool call' + (metaInfo.toolCalls > 1 ? 's' : ''));
|
|
65866
|
+
if (metaInfo.tokens) parts.push(metaInfo.tokens + ' tokens');
|
|
65867
|
+
if (metaInfo.duration) parts.push((metaInfo.duration / 1000).toFixed(1) + 's');
|
|
65868
|
+
metaBar.innerHTML = parts.map(p => '<span>' + p + '</span>').join('');
|
|
65869
|
+
msgDiv.appendChild(metaBar);
|
|
65870
|
+
}
|
|
65871
|
+
|
|
65872
|
+
// Collapse tool calls into a dropdown
|
|
65858
65873
|
if (chatTools.length > 0) {
|
|
65859
65874
|
const details = document.createElement('details');
|
|
65860
|
-
details.style.cssText = 'margin:
|
|
65875
|
+
details.style.cssText = 'margin:2px 0;font-size:0.65rem;color:#555';
|
|
65861
65876
|
const summary = document.createElement('summary');
|
|
65862
|
-
summary.style.cssText = 'cursor:pointer;color:#
|
|
65863
|
-
summary.textContent = chatTools.length + ' tool call' + (chatTools.length > 1 ? 's' : '')
|
|
65877
|
+
summary.style.cssText = 'cursor:pointer;color:#888;font-size:0.6rem';
|
|
65878
|
+
summary.textContent = 'show ' + chatTools.length + ' tool call' + (chatTools.length > 1 ? 's' : '');
|
|
65864
65879
|
details.appendChild(summary);
|
|
65865
|
-
// Move live tool elements into the details
|
|
65866
65880
|
while (toolsContainer.firstChild) details.appendChild(toolsContainer.firstChild);
|
|
65867
65881
|
toolsContainer.appendChild(details);
|
|
65868
65882
|
}
|
|
65883
|
+
|
|
65884
|
+
// Action buttons
|
|
65869
65885
|
const actions = document.createElement('div');
|
|
65870
65886
|
actions.className = 'msg-actions';
|
|
65871
65887
|
const copyBtn = document.createElement('button');
|
|
@@ -65911,9 +65927,9 @@ function closeKeyModal() {
|
|
|
65911
65927
|
}
|
|
65912
65928
|
|
|
65913
65929
|
// Tab switching
|
|
65914
|
-
const allPanels = ['
|
|
65930
|
+
const allPanels = ['chat-container','agent-panel','jobs-panel','config-panel','activity-panel'];
|
|
65915
65931
|
function switchTab(tab) {
|
|
65916
|
-
const panelMap = {chat:'
|
|
65932
|
+
const panelMap = {chat:'chat-container',agent:'agent-panel',jobs:'jobs-panel',config:'config-panel',activity:'activity-panel'};
|
|
65917
65933
|
allPanels.forEach(id => { const el = document.getElementById(id); if(el) el.style.display = 'none'; });
|
|
65918
65934
|
const panel = document.getElementById(panelMap[tab]);
|
|
65919
65935
|
if (panel) panel.style.display = tab === 'chat' ? 'flex' : 'block';
|
package/package.json
CHANGED