open-agents-ai 0.185.54 → 0.185.56
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 +17 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28576,13 +28576,10 @@ ${transcript}`
|
|
|
28576
28576
|
const tmpIn = join77(tmpdir11(), `oa_img_in_${Date.now()}.png`);
|
|
28577
28577
|
const tmpOut = join77(tmpdir11(), `oa_img_out_${Date.now()}.jpg`);
|
|
28578
28578
|
writeFileSync30(tmpIn, buffer);
|
|
28579
|
-
|
|
28580
|
-
|
|
28581
|
-
|
|
28582
|
-
img.thumbnail((512, 512), Image.LANCZOS)
|
|
28583
|
-
img = img.convert('RGB')
|
|
28584
|
-
img.save('${tmpOut}', 'JPEG', quality=75)
|
|
28585
|
-
"`, { timeout: 1e4, stdio: "pipe" });
|
|
28579
|
+
const pyBin = process.platform === "win32" ? "python" : "python3";
|
|
28580
|
+
const escapedIn = tmpIn.replace(/\\/g, "\\\\");
|
|
28581
|
+
const escapedOut = tmpOut.replace(/\\/g, "\\\\");
|
|
28582
|
+
execSync36(`${pyBin} -c "from PIL import Image; img = Image.open('${escapedIn}'); img.thumbnail((512, 512), Image.LANCZOS); img = img.convert('RGB'); img.save('${escapedOut}', 'JPEG', quality=75)"`, { timeout: 1e4, stdio: "pipe" });
|
|
28586
28583
|
const resizedBuf = readFileSync45(tmpOut);
|
|
28587
28584
|
resizedBase64 = `data:image/jpeg;base64,${resizedBuf.toString("base64")}`;
|
|
28588
28585
|
try {
|
|
@@ -28609,7 +28606,7 @@ img.save('${tmpOut}', 'JPEG', quality=75)
|
|
|
28609
28606
|
this.emit({ type: "status", content: `Downconverted images to 512px JPEG \u2014 retrying`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
28610
28607
|
return true;
|
|
28611
28608
|
}
|
|
28612
|
-
this.emit({ type: "status", content: `Downconversion
|
|
28609
|
+
this.emit({ type: "status", content: `Downconversion failed \u2014 trying vision model fallback...`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
28613
28610
|
const ollamaHost = process.env["OLLAMA_HOST"] || "http://127.0.0.1:11434";
|
|
28614
28611
|
let described = false;
|
|
28615
28612
|
for (const entry of imageEntries) {
|
|
@@ -28684,7 +28681,7 @@ ${description}`
|
|
|
28684
28681
|
this.emit({ type: "status", content: `Images replaced with descriptions \u2014 retrying`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
28685
28682
|
return true;
|
|
28686
28683
|
}
|
|
28687
|
-
this.emit({ type: "status", content: `
|
|
28684
|
+
this.emit({ type: "status", content: `Image could not be processed \u2014 stripping images (text context preserved)`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
28688
28685
|
for (const msg of messages) {
|
|
28689
28686
|
if (Array.isArray(msg.content)) {
|
|
28690
28687
|
const textParts = msg.content.filter((p) => p.type !== "image_url");
|
|
@@ -66968,6 +66965,7 @@ function buildTools(repoRoot, config, contextWindowSize) {
|
|
|
66968
66965
|
// Full OA sub-process — callbacks wired after runner + statusBar created
|
|
66969
66966
|
(() => {
|
|
66970
66967
|
_fullSubAgentToolRef = new FullSubAgentTool(repoRoot, config.model, config.backendUrl);
|
|
66968
|
+
_wireSubAgentCallbacks?.(_fullSubAgentToolRef);
|
|
66971
66969
|
return _fullSubAgentToolRef;
|
|
66972
66970
|
})(),
|
|
66973
66971
|
// Nexus P2P networking + x402 micropayments
|
|
@@ -67773,8 +67771,9 @@ ${entry.fullContent}`
|
|
|
67773
67771
|
process.stdout.write = ((chunk, ...args) => {
|
|
67774
67772
|
const text = typeof chunk === "string" ? chunk : new TextDecoder().decode(chunk);
|
|
67775
67773
|
for (const line of text.split("\n")) {
|
|
67776
|
-
if (line.length > 0)
|
|
67774
|
+
if (line.replace(/\x1B\[[0-9;]*[A-Za-z]/g, "").length > 0) {
|
|
67777
67775
|
statusBar.bufferContentLine(line);
|
|
67776
|
+
}
|
|
67778
67777
|
}
|
|
67779
67778
|
return boundWrite(chunk, ...args);
|
|
67780
67779
|
});
|
|
@@ -68336,8 +68335,8 @@ async function startInteractive(config, repoPath) {
|
|
|
68336
68335
|
statusBar.activate(scrollTop);
|
|
68337
68336
|
setTerminalTitle(void 0, version);
|
|
68338
68337
|
banner.onAfterRender = () => statusBar.renderHeaderButtons();
|
|
68339
|
-
|
|
68340
|
-
|
|
68338
|
+
_wireSubAgentCallbacks = (tool) => {
|
|
68339
|
+
tool.setCallbacks({
|
|
68341
68340
|
onViewRegister: (id, label, type) => {
|
|
68342
68341
|
statusBar.registerAgentView(id, label, type);
|
|
68343
68342
|
registry.registerAgent({
|
|
@@ -68348,6 +68347,7 @@ async function startInteractive(config, repoPath) {
|
|
|
68348
68347
|
turns: 0,
|
|
68349
68348
|
toolCalls: 0
|
|
68350
68349
|
});
|
|
68350
|
+
statusBar.ensureMonitorTimer();
|
|
68351
68351
|
},
|
|
68352
68352
|
onViewWrite: (id, text) => statusBar.writeToAgentView(id, text),
|
|
68353
68353
|
onViewStatus: (id, status) => {
|
|
@@ -68369,7 +68369,9 @@ ${summary}
|
|
|
68369
68369
|
Review its full output in the [${id}] tab or via full_sub_agent(action='output', id='${id}')`);
|
|
68370
68370
|
}
|
|
68371
68371
|
});
|
|
68372
|
-
}
|
|
68372
|
+
};
|
|
68373
|
+
if (_fullSubAgentToolRef)
|
|
68374
|
+
_wireSubAgentCallbacks(_fullSubAgentToolRef);
|
|
68373
68375
|
statusBar.setBannerRefresh(() => {
|
|
68374
68376
|
banner.renderCurrentFrame();
|
|
68375
68377
|
});
|
|
@@ -71746,7 +71748,7 @@ Rules:
|
|
|
71746
71748
|
process.exit(1);
|
|
71747
71749
|
}
|
|
71748
71750
|
}
|
|
71749
|
-
var taskManager, _shellToolRef, _replToolRef, _fullSubAgentToolRef, _activeRunnerRef, _autoUpdatedThisSession, SELF_IMPROVE_INTERVAL, _tasksSinceImprove;
|
|
71751
|
+
var taskManager, _shellToolRef, _replToolRef, _fullSubAgentToolRef, _activeRunnerRef, _wireSubAgentCallbacks, _autoUpdatedThisSession, SELF_IMPROVE_INTERVAL, _tasksSinceImprove;
|
|
71750
71752
|
var init_interactive = __esm({
|
|
71751
71753
|
"packages/cli/dist/tui/interactive.js"() {
|
|
71752
71754
|
"use strict";
|
|
@@ -71791,6 +71793,7 @@ var init_interactive = __esm({
|
|
|
71791
71793
|
_replToolRef = null;
|
|
71792
71794
|
_fullSubAgentToolRef = null;
|
|
71793
71795
|
_activeRunnerRef = null;
|
|
71796
|
+
_wireSubAgentCallbacks = null;
|
|
71794
71797
|
_autoUpdatedThisSession = false;
|
|
71795
71798
|
SELF_IMPROVE_INTERVAL = 5;
|
|
71796
71799
|
_tasksSinceImprove = 0;
|
package/package.json
CHANGED