open-agents-ai 0.31.9 → 0.32.1
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 +18 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7425,6 +7425,8 @@ var init_desktop_click = __esm({
|
|
|
7425
7425
|
"Use shell commands to interact with the desktop instead:",
|
|
7426
7426
|
" xdotool search --name 'pattern' \u2014 find windows by title",
|
|
7427
7427
|
" xdotool key 'ctrl+s' \u2014 send keyboard shortcuts",
|
|
7428
|
+
" xdotool type --window $WID 'text' \u2014 type text into a specific window (use --window, NOT positional arg)",
|
|
7429
|
+
" xdotool key --window $WID Return \u2014 send key to a specific window",
|
|
7428
7430
|
" xdotool mousemove X Y click 1 \u2014 click at known coordinates",
|
|
7429
7431
|
" wmctrl -a 'window title' \u2014 activate a window by name"
|
|
7430
7432
|
];
|
|
@@ -11018,7 +11020,7 @@ You have a comprehensive set of tools. NEVER say "I can't do that" or "I don't h
|
|
|
11018
11020
|
- Need to open Firefox? Use shell: \`firefox https://example.com &\`
|
|
11019
11021
|
- Need to click a button? Use desktop_click or shell with xdotool
|
|
11020
11022
|
- Need to see the screen? Use screenshot or desktop_describe
|
|
11021
|
-
- Need to type text? Use shell with xdotool: \`xdotool type "text"\`
|
|
11023
|
+
- Need to type text? Use shell with xdotool: \`xdotool type "text"\` (to target a specific window: \`xdotool type --window $WID "text"\`)
|
|
11022
11024
|
- Need to install software? Use shell: \`sudo apt install ...\`
|
|
11023
11025
|
- Need to interact with a website? Use web_fetch, or open the browser and use desktop tools
|
|
11024
11026
|
|
|
@@ -11090,6 +11092,8 @@ When asked to interact with desktop applications (open browsers, click buttons,
|
|
|
11090
11092
|
2. Use screenshot or desktop_describe to see what's on screen
|
|
11091
11093
|
3. Use desktop_click to click UI elements: \`desktop_click({target: "Sign Up button"})\`
|
|
11092
11094
|
4. Use shell with xdotool for keyboard input: \`xdotool type "username"\` and \`xdotool key Return\`
|
|
11095
|
+
To target a specific window by ID: \`xdotool type --window $WID "text"\` and \`xdotool key --window $WID Return\`
|
|
11096
|
+
IMPORTANT: xdotool type/key use \`--window WID\` flag, NOT positional args. \`xdotool type -- $WID "text"\` is WRONG (types the WID as text).
|
|
11093
11097
|
5. Use shell with xdotool for navigation: \`xdotool key Tab\`, \`xdotool key ctrl+l\`
|
|
11094
11098
|
6. Take screenshots between steps to verify progress
|
|
11095
11099
|
|
|
@@ -11403,7 +11407,7 @@ Rules:
|
|
|
11403
11407
|
pause() {
|
|
11404
11408
|
if (!this._paused) {
|
|
11405
11409
|
this._paused = true;
|
|
11406
|
-
this.emit({ type: "
|
|
11410
|
+
this.emit({ type: "status", content: "Task paused by user.", timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
11407
11411
|
}
|
|
11408
11412
|
}
|
|
11409
11413
|
/**
|
|
@@ -11412,7 +11416,7 @@ Rules:
|
|
|
11412
11416
|
resume() {
|
|
11413
11417
|
if (this._paused) {
|
|
11414
11418
|
this._paused = false;
|
|
11415
|
-
this.emit({ type: "
|
|
11419
|
+
this.emit({ type: "status", content: "Task resumed by user.", timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
11416
11420
|
if (this._pauseResolve) {
|
|
11417
11421
|
this._pauseResolve();
|
|
11418
11422
|
this._pauseResolve = null;
|
|
@@ -11435,7 +11439,7 @@ Rules:
|
|
|
11435
11439
|
requestCompaction(strategy = "default") {
|
|
11436
11440
|
this._pendingCompaction = strategy;
|
|
11437
11441
|
this.emit({
|
|
11438
|
-
type: "
|
|
11442
|
+
type: "status",
|
|
11439
11443
|
content: `Manual compaction requested (strategy: ${strategy})`,
|
|
11440
11444
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
11441
11445
|
});
|
|
@@ -11554,7 +11558,7 @@ TASK: ${task}` : task }
|
|
|
11554
11558
|
const elapsed = now - start;
|
|
11555
11559
|
const repetitionScore = this.detectRepetition(toolCallLog);
|
|
11556
11560
|
this.emit({
|
|
11557
|
-
type: "
|
|
11561
|
+
type: "status",
|
|
11558
11562
|
content: `Health check #${selfEvalCount} (${(elapsed / 6e4).toFixed(1)}m elapsed) \u2014 assessing progress`,
|
|
11559
11563
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
11560
11564
|
});
|
|
@@ -11815,7 +11819,7 @@ ${result.output.length > maxLen ? this.foldOutput(result.output, maxLen) : resul
|
|
|
11815
11819
|
bruteForceCycle++;
|
|
11816
11820
|
const totalTurns = messages.filter((m) => m.role === "assistant").length;
|
|
11817
11821
|
this.emit({
|
|
11818
|
-
type: "
|
|
11822
|
+
type: "status",
|
|
11819
11823
|
content: `Re-engaging \u2014 cycle ${bruteForceCycle} (${totalTurns} turns, ${toolCallCount} tool calls so far)`,
|
|
11820
11824
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
11821
11825
|
});
|
|
@@ -11857,7 +11861,7 @@ You have ${this.options.maxTurns} more turns. Continue making progress. Call tas
|
|
|
11857
11861
|
const elapsed = bfNow - start;
|
|
11858
11862
|
const repetitionScore = this.detectRepetition(toolCallLog);
|
|
11859
11863
|
this.emit({
|
|
11860
|
-
type: "
|
|
11864
|
+
type: "status",
|
|
11861
11865
|
content: `Health check #${selfEvalCount} (${(elapsed / 6e4).toFixed(1)}m elapsed) \u2014 assessing progress`,
|
|
11862
11866
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
11863
11867
|
});
|
|
@@ -12861,8 +12865,8 @@ ${transcript}`
|
|
|
12861
12865
|
];
|
|
12862
12866
|
try {
|
|
12863
12867
|
this.emit({
|
|
12864
|
-
type: "
|
|
12865
|
-
content: "
|
|
12868
|
+
type: "status",
|
|
12869
|
+
content: "Compacting context \u2014 generating structured summary via LLM...",
|
|
12866
12870
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
12867
12871
|
});
|
|
12868
12872
|
const response = await this.backend.chatCompletion({
|
|
@@ -12924,7 +12928,7 @@ ${transcript}`
|
|
|
12924
12928
|
return null;
|
|
12925
12929
|
const delay = baseDelayMs * Math.pow(2, attempt - 1);
|
|
12926
12930
|
this.emit({
|
|
12927
|
-
type: "
|
|
12931
|
+
type: "status",
|
|
12928
12932
|
content: `Backend error \u2014 retrying in ${(delay / 1e3).toFixed(0)}s (attempt ${attempt}/${maxRetries})`,
|
|
12929
12933
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
12930
12934
|
});
|
|
@@ -12934,7 +12938,7 @@ ${transcript}`
|
|
|
12934
12938
|
try {
|
|
12935
12939
|
const response = this.options.streamEnabled && this.hasStreamingSupport() ? await this.streamingRequest(chatRequest, turn) : await this.backend.chatCompletion(chatRequest);
|
|
12936
12940
|
this.emit({
|
|
12937
|
-
type: "
|
|
12941
|
+
type: "status",
|
|
12938
12942
|
content: `Backend recovered on attempt ${attempt}`,
|
|
12939
12943
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
12940
12944
|
});
|
|
@@ -22391,6 +22395,9 @@ ${entry.fullContent}`
|
|
|
22391
22395
|
case "compaction":
|
|
22392
22396
|
contentWrite(() => renderWarning(`Context compacted: ${event.content}`));
|
|
22393
22397
|
break;
|
|
22398
|
+
case "status":
|
|
22399
|
+
contentWrite(() => renderInfo(event.content ?? ""));
|
|
22400
|
+
break;
|
|
22394
22401
|
case "error":
|
|
22395
22402
|
contentWrite(() => renderError(event.content ?? "Unknown error"));
|
|
22396
22403
|
break;
|
package/package.json
CHANGED