open-agents-ai 0.187.562 → 0.187.564
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 -65
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -532536,8 +532536,9 @@ ${memoryLines.join("\n")}`
|
|
|
532536
532536
|
});
|
|
532537
532537
|
for (const _old of _sorted.slice(0, 2)) {
|
|
532538
532538
|
const _oldId = _old.id;
|
|
532539
|
-
if (_oldId) {
|
|
532540
|
-
this.
|
|
532539
|
+
if (_oldId && this._todoInProgressTurn.has(_oldId)) {
|
|
532540
|
+
const _st = this._todoInProgressTurn.get(_oldId);
|
|
532541
|
+
this._evictCompletedTodoMessages(_st, turn, _oldId, _old.content, compacted);
|
|
532541
532542
|
}
|
|
532542
532543
|
}
|
|
532543
532544
|
}
|
|
@@ -533019,99 +533020,50 @@ ${memoryLines.join("\n")}`
|
|
|
533019
533020
|
]);
|
|
533020
533021
|
const REG61_BYPASS_TOOLS = /* @__PURE__ */ new Set([
|
|
533021
533022
|
...REG61_EDIT_TOOLS,
|
|
533022
|
-
// Escape hatches: explicitly allowed while gate is active so
|
|
533023
|
-
// the agent can exit cleanly (task_complete), escalate to human
|
|
533024
|
-
// (ask_user), or complete an explicit web task without deadlock.
|
|
533025
|
-
// shell, file_read, todo_*, grep_search, list_directory are
|
|
533026
|
-
// NOT in bypass — those are the exact patterns batch528/529
|
|
533027
|
-
// agents used to ignore REG-61.
|
|
533028
533023
|
"web_search",
|
|
533029
533024
|
"task_complete",
|
|
533030
533025
|
"ask_user",
|
|
533031
|
-
// DECOMP-1: sub-agent dispatch is productive work (it spawns
|
|
533032
|
-
// a focused-context implementation worker). Block-listing
|
|
533033
|
-
// sub_agent here would defeat the spec-decomposition pattern
|
|
533034
|
-
// — agents would be forced into main-context edits even when
|
|
533035
|
-
// delegation is the right move. sub_agent calls do NOT clear
|
|
533036
|
-
// the gate (we want the agent to also produce direct edits
|
|
533037
|
-
// for orchestration glue / integration), but they're allowed
|
|
533038
|
-
// through.
|
|
533039
533026
|
"sub_agent",
|
|
533040
533027
|
"priority_delegate",
|
|
533041
533028
|
"background_run"
|
|
533042
533029
|
]);
|
|
533043
533030
|
if (this._reg61PerpetualGateActive && !REG61_BYPASS_TOOLS.has(tc.name) && process.env["OA_DISABLE_REG61_COERCE"] !== "1") {
|
|
533044
|
-
this.emit({
|
|
533045
|
-
type: "tool_call",
|
|
533046
|
-
toolName: tc.name,
|
|
533047
|
-
toolArgs: tc.arguments,
|
|
533048
|
-
turn,
|
|
533049
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
533050
|
-
});
|
|
533051
533031
|
const _dbgLoop = this._detectDebugLoop(toolCallLog);
|
|
533052
533032
|
const _debugLoopSampleSafe = (_dbgLoop.repeatedSample ?? "").slice(0, 120);
|
|
533053
533033
|
const _localFailureNudge = this._renderLocalFailureNudge(turn);
|
|
533054
|
-
const
|
|
533055
|
-
`[
|
|
533034
|
+
const reg61SteerMsg = _dbgLoop.detected ? [
|
|
533035
|
+
`[REG-61 directive active — REG-66 DEBUG-LOOP detected]`,
|
|
533056
533036
|
``,
|
|
533057
|
-
`Pattern: ${_dbgLoop.kind === "shell" ? "shell command" : "file"} "${_debugLoopSampleSafe}" was used ${_dbgLoop.count}× in the trailing window with ZERO creative edits landing. You
|
|
533037
|
+
`Pattern: ${_dbgLoop.kind === "shell" ? "shell command" : "file"} "${_debugLoopSampleSafe}" was used ${_dbgLoop.count}× in the trailing window with ZERO creative edits landing. You appear stuck in a debug loop where re-running / re-reading is producing no new information.`,
|
|
533058
533038
|
``,
|
|
533059
|
-
`
|
|
533039
|
+
`Consider PERTURBING: make a speculative edit to get a NEW error signal.`,
|
|
533060
533040
|
``,
|
|
533061
|
-
`Strategy
|
|
533062
|
-
` 1. Pick the source file most likely implicated by the recurring failure
|
|
533041
|
+
`Strategy:`,
|
|
533042
|
+
` 1. Pick the source file most likely implicated by the recurring failure.`,
|
|
533063
533043
|
` 2. Pick ONE plausible cause — most-recently-modified line, most-complex function, most-likely-misnamed import, most-likely off-by-one.`,
|
|
533064
533044
|
` 3. Make a SPECULATIVE edit that changes that thing — even if you are NOT certain it'll fix the bug. The point is to get a NEW error signal that disambiguates.`,
|
|
533065
|
-
` 4. Re-run the failing command. If the error CHANGED, you've learned something
|
|
533066
|
-
``,
|
|
533067
|
-
`This is NOT random guessing — it's targeted hypothesis falsification. Reading the same files 5+ times has already proven uninformative; only a state change will move the system.`,
|
|
533068
|
-
``,
|
|
533069
|
-
`Issue EXACTLY ONE of: file_write / file_edit / batch_edit / file_patch on a single concrete change. The edit must actually change disk state; dry-runs and no-ops do not clear this directive.`,
|
|
533045
|
+
` 4. Re-run the failing command. If the error CHANGED, you've learned something.`,
|
|
533070
533046
|
``,
|
|
533071
|
-
|
|
533072
|
-
``,
|
|
533073
|
-
`Allowed exits (will not be blocked but will not clear the directive either):`,
|
|
533074
|
-
` * task_complete - exit if you genuinely cannot identify any plausible local perturbation`,
|
|
533075
|
-
` * ask_user - escalate to human (if available)`,
|
|
533076
|
-
``,
|
|
533077
|
-
`Once you make a real edit, the directive clears and you'll see the new test result.`
|
|
533047
|
+
`This tool call was ALLOWED through, but the edit directive remains active.`
|
|
533078
533048
|
].join("\n") : [
|
|
533079
|
-
`[
|
|
533049
|
+
`[REG-61 directive active]`,
|
|
533080
533050
|
``,
|
|
533081
|
-
`A REG-61 FIRST-EDIT NUDGE was issued earlier and has not yet been satisfied. The directive
|
|
533051
|
+
`A REG-61 FIRST-EDIT NUDGE was issued earlier and has not yet been satisfied. The directive asks you to prioritize a creative edit. You issued '${tc.name}' instead, which is a read/explore/shell call.`,
|
|
533082
533052
|
``,
|
|
533083
|
-
`
|
|
533053
|
+
`This call was ALLOWED through (needed context should never be blocked), but try to make a creative edit next:`,
|
|
533084
533054
|
` • file_write — create a new file`,
|
|
533085
533055
|
` • file_edit — modify an existing file (find/replace)`,
|
|
533086
533056
|
` • batch_edit — multiple find/replace edits in one call`,
|
|
533087
533057
|
` • file_patch — apply a version-checked line-range patch`,
|
|
533088
533058
|
``,
|
|
533089
|
-
_localFailureNudge
|
|
533090
|
-
``,
|
|
533091
|
-
`These exits are also allowed while the directive is active (will not be blocked, will not clear the gate):`,
|
|
533092
|
-
` * task_complete - to exit if you cannot make any local progress`,
|
|
533093
|
-
` * ask_user - to escalate to human (if available)`,
|
|
533094
|
-
``,
|
|
533095
|
-
`Until you issue a creative edit that actually changes disk, ALL of these will be BLOCKED again on every turn: file_read, file_explore, list_directory, grep_search, shell, todo_write, todo_read, memory_read, memory_write, etc. Pick the smallest concrete change that moves work forward.`
|
|
533059
|
+
_localFailureNudge
|
|
533096
533060
|
].join("\n");
|
|
533097
|
-
|
|
533098
|
-
type: "tool_result",
|
|
533099
|
-
toolName: tc.name,
|
|
533100
|
-
success: false,
|
|
533101
|
-
content: reg61BlockMsg.slice(0, 120),
|
|
533102
|
-
turn,
|
|
533103
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
533104
|
-
});
|
|
533061
|
+
pushSoftInjection("system", reg61SteerMsg);
|
|
533105
533062
|
this.emit({
|
|
533106
533063
|
type: "status",
|
|
533107
|
-
content: `REG-61
|
|
533064
|
+
content: `REG-61 STEER — nudge injected for '${tc.name}' at turn ${turn}; tool ALLOWED; gate stays active${_dbgLoop.detected ? `; REG-66 debug-loop variant (${_dbgLoop.kind} "${_debugLoopSampleSafe.slice(0, 60)}" ${_dbgLoop.count}×)` : ""}`,
|
|
533108
533065
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
533109
533066
|
});
|
|
533110
|
-
this._tagSyntheticFailure({
|
|
533111
|
-
mode: "step_repetition",
|
|
533112
|
-
rationale: `REG-61 perpetual coercion block on '${tc.name}' — agent ignored FIRST-EDIT NUDGE${_dbgLoop.detected ? " (debug-loop variant)" : ""}`
|
|
533113
|
-
});
|
|
533114
|
-
return { tc, output: reg61BlockMsg };
|
|
533115
533067
|
}
|
|
533116
533068
|
{
|
|
533117
533069
|
const _decomp2Block = this._maybeDecomp2Block(tc, turn);
|
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.564",
|
|
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.564",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "CC-BY-NC-4.0",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED