open-agents-ai 0.187.525 → 0.187.526

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 CHANGED
@@ -525987,20 +525987,24 @@ var init_agenticRunner = __esm({
525987
525987
  // updated directive text names the 4 valid creative-edit tools and
525988
525988
  // explicitly excludes todo_write/memory_write/list_directory.
525989
525989
  _reg61CooldownUntilTurn = -1;
525990
- // BFC-61.E (root-cause from batch528-midi-bfc61, 2026-05-03): REG-61
525991
- // runtime coercion. Empirical: in batch528 the agent received 5 REG-61
525992
- // firings in main loop and ignored ALL of them while in vitest-debug-loop
525993
- // mode (0 edits in 65 tool calls). REG-61 is informational; the agent
525994
- // rationally ignores it when it believes "I need to read more to debug".
525995
- // This counter escalates REG-61 to runtime enforcement: when REG-61
525996
- // fires, _reg61BlocksRemaining is set to 1. The dispatch site checks: if
525997
- // blocks remain AND incoming tool is non-edit, BLOCK with a synthetic
525998
- // [BLOCKED REG-61 directive in effect] error and decrement. If the
525999
- // incoming tool IS an edit, the counter clears (directive satisfied).
526000
- // One block per fire not a perpetual gate; the agent's NEXT call
526001
- // after the block can be anything (until the NEXT REG-61 fire 5+ turns
526002
- // later). Kill switch: OA_DISABLE_REG61_COERCE=1.
526003
- _reg61BlocksRemaining = 0;
525990
+ // BFC-61.G (root-cause from batch529-midi-coerce, 2026-05-03): REG-61
525991
+ // PERPETUAL gate until obeyed. Replaces BFC-61.E's one-shot counter,
525992
+ // which empirically warned but did not change behavior agents took
525993
+ // the [BLOCKED] tool_result and on the very next turn issued ANOTHER
525994
+ // read (counter cleared, gate inert). batch529 measured 6 blocks across
525995
+ // 7 fires; ZERO of those blocks were followed by a creative edit on
525996
+ // the agent's next turn.
525997
+ //
525998
+ // Semantics: when REG-61 fires, this latch goes true. While true, every
525999
+ // non-bypass tool call gets BLOCKED with a synthetic error result. The
526000
+ // bypass set includes the 4 creative-edit tools plus web_search /
526001
+ // task_complete / ask_user (escape hatches). Any creative edit dispatch
526002
+ // clears the latch ("directive satisfied"). Shell, file_read, todo_*,
526003
+ // grep_search, list_directory etc. are NOT in bypass — those are the
526004
+ // exact patterns batch528/529 agents used to ignore REG-61.
526005
+ //
526006
+ // Kill switch: OA_DISABLE_REG61_COERCE=1 disables BOTH set and enforce.
526007
+ _reg61PerpetualGateActive = false;
526004
526008
  // MEM_PATH item #9: adaptive retrieval cache. When the (goalHash, recent-tool-sig)
526005
526009
  // hasn't changed since last retrieval, skip the PPR call entirely and reuse
526006
526010
  // the previous memoryLines.
@@ -526490,7 +526494,7 @@ Your hypotheses MUST address this specific error, not generic causes.
526490
526494
  return;
526491
526495
  this._reg61CooldownUntilTurn = turn + REG61_COOLDOWN;
526492
526496
  if (process.env["OA_DISABLE_REG61_COERCE"] !== "1") {
526493
- this._reg61BlocksRemaining = 1;
526497
+ this._reg61PerpetualGateActive = true;
526494
526498
  }
526495
526499
  const _gapDesc = this._lastFileWriteTurn < 0 ? `no creative edits yet this run` : `${turn - this._lastFileWriteTurn} turns since last creative edit (turn ${this._lastFileWriteTurn})`;
526496
526500
  const reg61Msg = `[FIRST-EDIT NUDGE — REG-61]
@@ -528330,7 +528334,7 @@ Respond with your assessment, then take action.`;
528330
528334
  this._fileWriteTimestamps = [];
528331
528335
  this._aborting = false;
528332
528336
  this._reg61CooldownUntilTurn = -1;
528333
- this._reg61BlocksRemaining = 0;
528337
+ this._reg61PerpetualGateActive = false;
528334
528338
  if (!globalThis.__oa_rca1_sigterm_installed) {
528335
528339
  globalThis.__oa_rca1_sigterm_installed = true;
528336
528340
  const _sigtermHandler = () => {
@@ -530365,52 +530369,70 @@ ${memoryLines.join("\n")}`
530365
530369
  "batch_edit",
530366
530370
  "file_patch"
530367
530371
  ]);
530368
- if (this._reg61BlocksRemaining > 0 && process.env["OA_DISABLE_REG61_COERCE"] !== "1") {
530369
- if (REG61_EDIT_TOOLS.has(tc.name)) {
530370
- this._reg61BlocksRemaining = 0;
530371
- } else {
530372
- this._reg61BlocksRemaining--;
530373
- this.emit({
530374
- type: "tool_call",
530375
- toolName: tc.name,
530376
- toolArgs: tc.arguments,
530377
- turn,
530378
- timestamp: (/* @__PURE__ */ new Date()).toISOString()
530379
- });
530380
- const reg61BlockMsg = [
530381
- `[BLOCKED REG-61 directive in effect]`,
530382
- ``,
530383
- `Your previous turn received a REG-61 FIRST-EDIT NUDGE telling you the next tool call MUST be a creative edit. You issued '${tc.name}' instead, which is a read/explore/shell call. This call has been BLOCKED.`,
530384
- ``,
530385
- `Issue EXACTLY ONE of these on your next turn:`,
530386
- ` • file_write — create a new file`,
530387
- ` • file_edit — modify an existing file (find/replace)`,
530388
- ` • batch_edit — multiple find/replace edits in one call`,
530389
- ` • file_patch — apply a unified diff`,
530390
- ``,
530391
- `Pick the smallest concrete change that moves work forward — even a partial stub or a single-line edit counts. Reading more without writing has been demonstrated (in your trailing window) to produce zero deliverables.`,
530392
- ``,
530393
- `If you genuinely cannot make ANY change without more information (e.g., truly unknown API), call web_search with the specific question. todo_write, list_directory, file_read, file_explore, grep_search, and shell will all be blocked again until an edit lands.`
530394
- ].join("\n");
530395
- this.emit({
530396
- type: "tool_result",
530397
- toolName: tc.name,
530398
- success: false,
530399
- content: reg61BlockMsg.slice(0, 120),
530400
- turn,
530401
- timestamp: (/* @__PURE__ */ new Date()).toISOString()
530402
- });
530403
- this.emit({
530404
- type: "status",
530405
- content: `REG-61 COERCION BLOCK rejected '${tc.name}' at turn ${turn}; agent must issue file_write/file_edit/batch_edit/file_patch next`,
530406
- timestamp: (/* @__PURE__ */ new Date()).toISOString()
530407
- });
530408
- this._tagSyntheticFailure({
530409
- mode: "step_repetition",
530410
- rationale: `REG-61 coercion block on '${tc.name}' agent ignored FIRST-EDIT NUDGE`
530411
- });
530412
- return { tc, output: reg61BlockMsg };
530413
- }
530372
+ const REG61_BYPASS_TOOLS = /* @__PURE__ */ new Set([
530373
+ ...REG61_EDIT_TOOLS,
530374
+ // Escape hatches: explicitly allowed while gate is active so
530375
+ // the agent can: search for unknown info (web_search), exit
530376
+ // cleanly (task_complete), or escalate to human (ask_user).
530377
+ // shell, file_read, todo_*, grep_search, list_directory are
530378
+ // NOT in bypass — those are the exact patterns batch528/529
530379
+ // agents used to ignore REG-61.
530380
+ "web_search",
530381
+ "task_complete",
530382
+ "ask_user"
530383
+ ]);
530384
+ if (REG61_EDIT_TOOLS.has(tc.name) && this._reg61PerpetualGateActive) {
530385
+ this._reg61PerpetualGateActive = false;
530386
+ this.emit({
530387
+ type: "status",
530388
+ content: `REG-61 GATE CLEARED — '${tc.name}' satisfied REG-61 directive at turn ${turn}`,
530389
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
530390
+ });
530391
+ }
530392
+ if (this._reg61PerpetualGateActive && !REG61_BYPASS_TOOLS.has(tc.name) && process.env["OA_DISABLE_REG61_COERCE"] !== "1") {
530393
+ this.emit({
530394
+ type: "tool_call",
530395
+ toolName: tc.name,
530396
+ toolArgs: tc.arguments,
530397
+ turn,
530398
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
530399
+ });
530400
+ const reg61BlockMsg = [
530401
+ `[BLOCKED — REG-61 directive in effect]`,
530402
+ ``,
530403
+ `A REG-61 FIRST-EDIT NUDGE was issued earlier and has not yet been satisfied. The directive: your next tool call MUST be a creative edit. You issued '${tc.name}' instead, which is a read/explore/shell call. This call has been BLOCKED.`,
530404
+ ``,
530405
+ `Issue EXACTLY ONE of these to clear the directive:`,
530406
+ ` • file_write — create a new file`,
530407
+ ` • file_edit — modify an existing file (find/replace)`,
530408
+ ` • batch_edit — multiple find/replace edits in one call`,
530409
+ ` file_patch apply a unified diff`,
530410
+ ``,
530411
+ `These tools are also allowed while the directive is active (will not be blocked, will not clear the gate):`,
530412
+ ` • web_search — for genuinely-unknown APIs / error strings`,
530413
+ ` • task_complete — to exit if you cannot make any progress`,
530414
+ ` ask_user — to escalate to human (if available)`,
530415
+ ``,
530416
+ `Until you issue a creative edit, 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 — even a partial stub or a single-line edit counts.`
530417
+ ].join("\n");
530418
+ this.emit({
530419
+ type: "tool_result",
530420
+ toolName: tc.name,
530421
+ success: false,
530422
+ content: reg61BlockMsg.slice(0, 120),
530423
+ turn,
530424
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
530425
+ });
530426
+ this.emit({
530427
+ type: "status",
530428
+ content: `REG-61 COERCION BLOCK — rejected '${tc.name}' at turn ${turn}; gate stays active until creative edit dispatches`,
530429
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
530430
+ });
530431
+ this._tagSyntheticFailure({
530432
+ mode: "step_repetition",
530433
+ rationale: `REG-61 perpetual coercion block on '${tc.name}' — agent ignored FIRST-EDIT NUDGE`
530434
+ });
530435
+ return { tc, output: reg61BlockMsg };
530414
530436
  }
530415
530437
  const PROGRESS_GATE_BYPASS_TOOLS = /* @__PURE__ */ new Set([
530416
530438
  "todo_write",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.525",
3
+ "version": "0.187.526",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "open-agents-ai",
9
- "version": "0.187.525",
9
+ "version": "0.187.526",
10
10
  "hasInstallScript": true,
11
11
  "license": "CC-BY-NC-4.0",
12
12
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.525",
3
+ "version": "0.187.526",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",