open-agents-ai 0.187.527 → 0.187.528
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 +104 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -526174,6 +526174,18 @@ var init_agenticRunner = __esm({
|
|
|
526174
526174
|
//
|
|
526175
526175
|
// Kill switch: OA_DISABLE_REG61_COERCE=1 disables BOTH set and enforce.
|
|
526176
526176
|
_reg61PerpetualGateActive = false;
|
|
526177
|
+
// DECOMP-2 (root-cause from batch531-midi-decomp, 2026-05-03): compelling
|
|
526178
|
+
// sub_agent delegation. DECOMP-1's informational directive was ignored
|
|
526179
|
+
// (0 sub_agent calls in 466 tool-call run despite directive at turn 1).
|
|
526180
|
+
// Mirrors the BFC-61.G escalation arc: when the agent has edited
|
|
526181
|
+
// ≥THRESHOLD distinct files in main context WITHOUT calling sub_agent,
|
|
526182
|
+
// the dispatcher BLOCKS edits to NEW files (paths not yet edited) until
|
|
526183
|
+
// sub_agent is invoked. Edits to already-touched files are still allowed
|
|
526184
|
+
// (current-module finishing work). sub_agent dispatch clears the gate.
|
|
526185
|
+
// Kill switch: OA_DISABLE_DECOMP2=1.
|
|
526186
|
+
_decomp2MainContextFiles = /* @__PURE__ */ new Set();
|
|
526187
|
+
_decomp2SubAgentCalls = 0;
|
|
526188
|
+
_decomp2GateActive = false;
|
|
526177
526189
|
// MEM_PATH item #9: adaptive retrieval cache. When the (goalHash, recent-tool-sig)
|
|
526178
526190
|
// hasn't changed since last retrieval, skip the PPR call entirely and reuse
|
|
526179
526191
|
// the previous memoryLines.
|
|
@@ -528504,6 +528516,9 @@ Respond with your assessment, then take action.`;
|
|
|
528504
528516
|
this._aborting = false;
|
|
528505
528517
|
this._reg61CooldownUntilTurn = -1;
|
|
528506
528518
|
this._reg61PerpetualGateActive = false;
|
|
528519
|
+
this._decomp2MainContextFiles = /* @__PURE__ */ new Set();
|
|
528520
|
+
this._decomp2SubAgentCalls = 0;
|
|
528521
|
+
this._decomp2GateActive = false;
|
|
528507
528522
|
if (!globalThis.__oa_rca1_sigterm_installed) {
|
|
528508
528523
|
globalThis.__oa_rca1_sigterm_installed = true;
|
|
528509
528524
|
const _sigtermHandler = () => {
|
|
@@ -530654,6 +530669,71 @@ ${memoryLines.join("\n")}`
|
|
|
530654
530669
|
});
|
|
530655
530670
|
return { tc, output: reg61BlockMsg };
|
|
530656
530671
|
}
|
|
530672
|
+
if (this._decomp2GateActive && process.env["OA_DISABLE_DECOMP2"] !== "1") {
|
|
530673
|
+
const DECOMP2_EDIT_TOOLS = /* @__PURE__ */ new Set([
|
|
530674
|
+
"file_write",
|
|
530675
|
+
"file_edit",
|
|
530676
|
+
"batch_edit",
|
|
530677
|
+
"file_patch"
|
|
530678
|
+
]);
|
|
530679
|
+
if (DECOMP2_EDIT_TOOLS.has(tc.name)) {
|
|
530680
|
+
const _editPath = tc.arguments?.["path"] ?? "";
|
|
530681
|
+
const _isNewFile = _editPath && !this._decomp2MainContextFiles.has(_editPath);
|
|
530682
|
+
if (_isNewFile) {
|
|
530683
|
+
this.emit({
|
|
530684
|
+
type: "tool_call",
|
|
530685
|
+
toolName: tc.name,
|
|
530686
|
+
toolArgs: tc.arguments,
|
|
530687
|
+
turn,
|
|
530688
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
530689
|
+
});
|
|
530690
|
+
const _filesList = [...this._decomp2MainContextFiles].slice(0, 8).map((p2) => ` • ${p2}`).join("\n");
|
|
530691
|
+
const _moreFiles = this._decomp2MainContextFiles.size > 8 ? `
|
|
530692
|
+
... +${this._decomp2MainContextFiles.size - 8} more` : "";
|
|
530693
|
+
const decomp2Msg = [
|
|
530694
|
+
`[BLOCKED — DECOMP-2 main-context exhaustion]`,
|
|
530695
|
+
``,
|
|
530696
|
+
`You have already edited ${this._decomp2MainContextFiles.size} distinct files in main context without invoking sub_agent. Continuing to edit ANOTHER new file ('${_editPath}') will keep your context window saturated and trigger compaction thrashing.`,
|
|
530697
|
+
``,
|
|
530698
|
+
`Files you've already edited (will accept further edits to these):`,
|
|
530699
|
+
_filesList,
|
|
530700
|
+
_moreFiles,
|
|
530701
|
+
``,
|
|
530702
|
+
`For the next module, you MUST use sub_agent. Workflow:`,
|
|
530703
|
+
` 1. Pick a pending todo (the orchestrator pre-populated module todos via DECOMP-1).`,
|
|
530704
|
+
` 2. Call sub_agent({`,
|
|
530705
|
+
` subagent_type: "general",`,
|
|
530706
|
+
` prompt: "Implement <module-path> per spec",`,
|
|
530707
|
+
` relevantFiles: [{path: "<module-path>", content: "" /* or existing content */}],`,
|
|
530708
|
+
` constraints: ["Stay within <module-path>; integration verification happens later"],`,
|
|
530709
|
+
` })`,
|
|
530710
|
+
` 3. After sub_agent returns, mark the todo completed.`,
|
|
530711
|
+
``,
|
|
530712
|
+
`Why this matters: spreading edits across N files in main context burns ~N × file_size tokens. sub_agent gives the next module a focused context window.`,
|
|
530713
|
+
``,
|
|
530714
|
+
`If you have ALREADY edited '${_editPath}' (this is a continuation), the orchestrator's set must have missed it — call file_read to verify, then re-edit. Otherwise, dispatch sub_agent now.`
|
|
530715
|
+
].join("\n");
|
|
530716
|
+
this.emit({
|
|
530717
|
+
type: "tool_result",
|
|
530718
|
+
toolName: tc.name,
|
|
530719
|
+
success: false,
|
|
530720
|
+
content: decomp2Msg.slice(0, 120),
|
|
530721
|
+
turn,
|
|
530722
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
530723
|
+
});
|
|
530724
|
+
this.emit({
|
|
530725
|
+
type: "status",
|
|
530726
|
+
content: `DECOMP-2 NEW-FILE BLOCK — rejected ${tc.name}('${_editPath}') at turn ${turn}; gate stays active until sub_agent is invoked`,
|
|
530727
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
530728
|
+
});
|
|
530729
|
+
this._tagSyntheticFailure({
|
|
530730
|
+
mode: "step_repetition",
|
|
530731
|
+
rationale: `DECOMP-2 new-file block on '${tc.name}'(${_editPath}) — agent has spread edits across ${this._decomp2MainContextFiles.size} files without sub_agent`
|
|
530732
|
+
});
|
|
530733
|
+
return { tc, output: decomp2Msg };
|
|
530734
|
+
}
|
|
530735
|
+
}
|
|
530736
|
+
}
|
|
530657
530737
|
const PROGRESS_GATE_BYPASS_TOOLS = /* @__PURE__ */ new Set([
|
|
530658
530738
|
"todo_write",
|
|
530659
530739
|
"todo_read",
|
|
@@ -531761,6 +531841,30 @@ Respond with EXACTLY this structure before your next tool call:
|
|
|
531761
531841
|
if (this._fileWriteTimestamps.length > 200) {
|
|
531762
531842
|
this._fileWriteTimestamps.shift();
|
|
531763
531843
|
}
|
|
531844
|
+
const _editPath = tc.arguments?.["path"] ?? "";
|
|
531845
|
+
if (_editPath && typeof _editPath === "string") {
|
|
531846
|
+
this._decomp2MainContextFiles.add(_editPath);
|
|
531847
|
+
const DECOMP2_FILE_SPREAD_THRESHOLD = 5;
|
|
531848
|
+
if (!this._decomp2GateActive && this._decomp2MainContextFiles.size >= DECOMP2_FILE_SPREAD_THRESHOLD && this._decomp2SubAgentCalls === 0 && process.env["OA_DISABLE_DECOMP2"] !== "1") {
|
|
531849
|
+
this._decomp2GateActive = true;
|
|
531850
|
+
this.emit({
|
|
531851
|
+
type: "status",
|
|
531852
|
+
content: `DECOMP-2 NEW-FILE GATE ACTIVATED — ${this._decomp2MainContextFiles.size} distinct files edited in main context, 0 sub_agent calls; further edits to NEW files will be blocked until sub_agent is invoked`,
|
|
531853
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
531854
|
+
});
|
|
531855
|
+
}
|
|
531856
|
+
}
|
|
531857
|
+
}
|
|
531858
|
+
}
|
|
531859
|
+
if (tc.name === "sub_agent" || tc.name === "priority_delegate" || tc.name === "background_run") {
|
|
531860
|
+
this._decomp2SubAgentCalls++;
|
|
531861
|
+
if (this._decomp2GateActive) {
|
|
531862
|
+
this._decomp2GateActive = false;
|
|
531863
|
+
this.emit({
|
|
531864
|
+
type: "status",
|
|
531865
|
+
content: `DECOMP-2 GATE CLEARED — '${tc.name}' satisfied delegation directive at turn ${turn}`,
|
|
531866
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
531867
|
+
});
|
|
531764
531868
|
}
|
|
531765
531869
|
}
|
|
531766
531870
|
if (result && result.success === false) {
|
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.528",
|
|
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.528",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "CC-BY-NC-4.0",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED