open-agents-ai 0.187.521 → 0.187.523
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 +83 -0
- package/npm-shrinkwrap.json +9 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -525969,6 +525969,24 @@ var init_agenticRunner = __esm({
|
|
|
525969
525969
|
// (daemon timeout). End-of-Task block uses this to set finalStatus="timeout"
|
|
525970
525970
|
// in the session_gist instead of "abandoned".
|
|
525971
525971
|
_aborting = false;
|
|
525972
|
+
// REG-61 (root-cause from batch523/524 read-paralysis): sliding-window
|
|
525973
|
+
// first-edit / sustained-edit nudge. Fires when the agent has accumulated
|
|
525974
|
+
// ≥3 read-class calls since the last creative edit AND turn ≥ 4 (or
|
|
525975
|
+
// 5 turns since the last creative edit). Re-fires after a 5-turn cooldown
|
|
525976
|
+
// because batch524 showed BOTH failure modes:
|
|
525977
|
+
//
|
|
525978
|
+
// stax: 1 early file_write at call #3, then 22 reads without re-firing.
|
|
525979
|
+
// (Old one-shot REG-61 with `_lastFileWriteTurn<0` gate missed this.)
|
|
525980
|
+
//
|
|
525981
|
+
// osm: REG-61 fired at turn 4, agent responded with `todo_write`, then
|
|
525982
|
+
// resumed pure reads. (todo_write was treated as fulfilling the
|
|
525983
|
+
// creative-edit directive — directive text needs to exclude it.)
|
|
525984
|
+
//
|
|
525985
|
+
// Sliding-window with 5-turn cooldown handles both: re-fires when the
|
|
525986
|
+
// agent slips back into read-paralysis after a successful edit, and
|
|
525987
|
+
// updated directive text names the 4 valid creative-edit tools and
|
|
525988
|
+
// explicitly excludes todo_write/memory_write/list_directory.
|
|
525989
|
+
_reg61CooldownUntilTurn = -1;
|
|
525972
525990
|
// MEM_PATH item #9: adaptive retrieval cache. When the (goalHash, recent-tool-sig)
|
|
525973
525991
|
// hasn't changed since last retrieval, skip the PPR call entirely and reuse
|
|
525974
525992
|
// the previous memoryLines.
|
|
@@ -528178,6 +528196,7 @@ Respond with your assessment, then take action.`;
|
|
|
528178
528196
|
this._lastFileWriteTurn = -1;
|
|
528179
528197
|
this._fileWriteTimestamps = [];
|
|
528180
528198
|
this._aborting = false;
|
|
528199
|
+
this._reg61CooldownUntilTurn = -1;
|
|
528181
528200
|
if (!globalThis.__oa_rca1_sigterm_installed) {
|
|
528182
528201
|
globalThis.__oa_rca1_sigterm_installed = true;
|
|
528183
528202
|
const _sigtermHandler = () => {
|
|
@@ -528601,6 +528620,70 @@ TASK: ${task}` : task;
|
|
|
528601
528620
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
528602
528621
|
});
|
|
528603
528622
|
}
|
|
528623
|
+
const REG61_TURN_FLOOR = 4;
|
|
528624
|
+
const REG61_MIN_READS = 3;
|
|
528625
|
+
const REG61_NO_WRITE_GAP = 5;
|
|
528626
|
+
const REG61_COOLDOWN = 5;
|
|
528627
|
+
if (turn >= REG61_TURN_FLOOR && turn > this._reg61CooldownUntilTurn && process.env["OA_DISABLE_REG61"] !== "1") {
|
|
528628
|
+
const _writeGate = this._lastFileWriteTurn < 0 || turn - this._lastFileWriteTurn >= REG61_NO_WRITE_GAP;
|
|
528629
|
+
if (_writeGate) {
|
|
528630
|
+
const _readClassNames = /* @__PURE__ */ new Set([
|
|
528631
|
+
"file_read",
|
|
528632
|
+
"file_explore",
|
|
528633
|
+
"list_directory",
|
|
528634
|
+
"grep_search",
|
|
528635
|
+
"glob_find",
|
|
528636
|
+
"find_files",
|
|
528637
|
+
"code_neighbors",
|
|
528638
|
+
"repo_map",
|
|
528639
|
+
"codebase_map",
|
|
528640
|
+
"semantic_map",
|
|
528641
|
+
"symbol_search",
|
|
528642
|
+
"todo_read",
|
|
528643
|
+
"memory_read",
|
|
528644
|
+
"memory_search"
|
|
528645
|
+
]);
|
|
528646
|
+
let _readsInWindow = 0;
|
|
528647
|
+
const _editClassNames = /* @__PURE__ */ new Set([
|
|
528648
|
+
"file_write",
|
|
528649
|
+
"file_edit",
|
|
528650
|
+
"batch_edit",
|
|
528651
|
+
"file_patch"
|
|
528652
|
+
]);
|
|
528653
|
+
for (let k = toolCallLog.length - 1; k >= 0; k--) {
|
|
528654
|
+
const _name = toolCallLog[k].name;
|
|
528655
|
+
if (_editClassNames.has(_name))
|
|
528656
|
+
break;
|
|
528657
|
+
if (_readClassNames.has(_name))
|
|
528658
|
+
_readsInWindow++;
|
|
528659
|
+
}
|
|
528660
|
+
if (_readsInWindow >= REG61_MIN_READS) {
|
|
528661
|
+
this._reg61CooldownUntilTurn = turn + REG61_COOLDOWN;
|
|
528662
|
+
const _gapDesc = this._lastFileWriteTurn < 0 ? `no creative edits yet this run` : `${turn - this._lastFileWriteTurn} turns since last creative edit (turn ${this._lastFileWriteTurn})`;
|
|
528663
|
+
const reg61Msg = `[FIRST-EDIT NUDGE — REG-61]
|
|
528664
|
+
You have made ${_readsInWindow} read/exploration calls in the trailing window — ${_gapDesc}. Reading is preparation; writing is progress. Runs that stay in pure-read mode produce zero deliverables.
|
|
528665
|
+
|
|
528666
|
+
Your NEXT tool call MUST be EXACTLY ONE of:
|
|
528667
|
+
• file_write — create a new file
|
|
528668
|
+
• file_edit — modify an existing file (find/replace)
|
|
528669
|
+
• batch_edit — multiple find/replace edits in one call
|
|
528670
|
+
• file_patch — apply a unified diff
|
|
528671
|
+
|
|
528672
|
+
These are the ONLY four tools that count as creative edits. The following do NOT count and will NOT satisfy this directive:
|
|
528673
|
+
• todo_write (only updates the todo list, not the filesystem)
|
|
528674
|
+
• memory_write (writes to memory store, not the project)
|
|
528675
|
+
• list_directory / file_read / file_explore / grep_search / shell
|
|
528676
|
+
|
|
528677
|
+
Pick the SMALLEST concrete deliverable from the spec — typically the project entry point or the file most other modules depend on. Write a stub or skeleton if the full implementation is too large; you can iterate later. Do NOT issue another read or todo update before producing the next file_write/file_edit/batch_edit/file_patch.`;
|
|
528678
|
+
messages2.push({ role: "system", content: reg61Msg });
|
|
528679
|
+
this.emit({
|
|
528680
|
+
type: "status",
|
|
528681
|
+
content: `REG-61 FIRST-EDIT NUDGE — fired at turn ${turn}; reads_in_window=${_readsInWindow}; ${_gapDesc}`,
|
|
528682
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
528683
|
+
});
|
|
528684
|
+
}
|
|
528685
|
+
}
|
|
528686
|
+
}
|
|
528604
528687
|
const REG58_NO_WRITE_BUDGET = 30;
|
|
528605
528688
|
if (turn > stagnationCooldownUntilTurn && this._lastFileWriteTurn >= 0 && turn - this._lastFileWriteTurn >= REG58_NO_WRITE_BUDGET && process.env["OA_DISABLE_REG58"] !== "1") {
|
|
528606
528689
|
const gap = turn - this._lastFileWriteTurn;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-agents-ai",
|
|
3
|
-
"version": "0.187.
|
|
3
|
+
"version": "0.187.523",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "open-agents-ai",
|
|
9
|
-
"version": "0.187.
|
|
9
|
+
"version": "0.187.523",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "CC-BY-NC-4.0",
|
|
12
12
|
"dependencies": {
|
|
@@ -2070,12 +2070,12 @@
|
|
|
2070
2070
|
"license": "MIT"
|
|
2071
2071
|
},
|
|
2072
2072
|
"node_modules/axios": {
|
|
2073
|
-
"version": "1.
|
|
2074
|
-
"resolved": "https://registry.npmjs.org/axios/-/axios-1.
|
|
2075
|
-
"integrity": "sha512-
|
|
2073
|
+
"version": "1.16.0",
|
|
2074
|
+
"resolved": "https://registry.npmjs.org/axios/-/axios-1.16.0.tgz",
|
|
2075
|
+
"integrity": "sha512-6hp5CwvTPlN2A31g5dxnwAX0orzM7pmCRDLnZSX772mv8WDqICwFjowHuPs04Mc8deIld1+ejhtaMn5vp6b+1w==",
|
|
2076
2076
|
"license": "MIT",
|
|
2077
2077
|
"dependencies": {
|
|
2078
|
-
"follow-redirects": "^1.
|
|
2078
|
+
"follow-redirects": "^1.16.0",
|
|
2079
2079
|
"form-data": "^4.0.5",
|
|
2080
2080
|
"proxy-from-env": "^2.1.0"
|
|
2081
2081
|
}
|
|
@@ -7036,9 +7036,9 @@
|
|
|
7036
7036
|
}
|
|
7037
7037
|
},
|
|
7038
7038
|
"node_modules/yaml": {
|
|
7039
|
-
"version": "2.8.
|
|
7040
|
-
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.
|
|
7041
|
-
"integrity": "sha512-
|
|
7039
|
+
"version": "2.8.4",
|
|
7040
|
+
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.4.tgz",
|
|
7041
|
+
"integrity": "sha512-ml/JPOj9fOQK8RNnWojA67GbZ0ApXAUlN2UQclwv2eVgTgn7O9gg9o7paZWKMp4g0H3nTLtS9LVzhkpOFIKzog==",
|
|
7042
7042
|
"license": "ISC",
|
|
7043
7043
|
"bin": {
|
|
7044
7044
|
"yaml": "bin.mjs"
|
package/package.json
CHANGED