open-agents-ai 0.187.484 → 0.187.485

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
@@ -519260,6 +519260,12 @@ var init_agenticRunner = __esm({
519260
519260
  // Pure observability — does not change runtime behavior. Each entry is
519261
519261
  // produced by mast-tagger.ts at every failure-emit site.
519262
519262
  _mastTags = [];
519263
+ // REG-36b: in-memory lesson bank for the CURRENT run. Lessons solicited
519264
+ // mid-run go here AND to disk; mid-run reflection/stagnation injections
519265
+ // query this in-memory bank so a lesson banked at turn 50 can surface
519266
+ // at turn 100 of the SAME run. Without this, the disk-only path means
519267
+ // the agent only benefits from prior-run lessons (cold start every run).
519268
+ _runLessons = [];
519263
519269
  // REG-37: per-turn dedup so the verification-required hint fires at most
519264
519270
  // once per todo per turn (todos can flip status across multiple
519265
519271
  // todo_writes within a single LLM response batch).
@@ -521511,7 +521517,27 @@ TASK: ${task}` : task;
521511
521517
  filesDeltaMin: STAG_FILES_DELTA_MIN,
521512
521518
  minSamples: STAG_MIN_SAMPLES
521513
521519
  })) {
521514
- messages2.push({ role: "system", content: buildStagnationDiagnostic(signals) });
521520
+ let _stagBody = buildStagnationDiagnostic(signals);
521521
+ if (this._runLessons.length > 0) {
521522
+ const _query = `${this._taskState.goal || ""} ${signals.variantList.join(" ")}`;
521523
+ const _topLessons = select2({
521524
+ goal: _query,
521525
+ lessons: this._runLessons,
521526
+ k: 1
521527
+ });
521528
+ if (_topLessons.length > 0) {
521529
+ const _l = _topLessons[0];
521530
+ _stagBody += [
521531
+ ``,
521532
+ ``,
521533
+ `[INTRA-RUN LESSON — REG-36b — relevant pattern from earlier in THIS run]`,
521534
+ `Failed: ${_l.whatFailed.slice(0, 200)}`,
521535
+ `Worked: ${_l.whatWorked.slice(0, 200)}`,
521536
+ `Apply this if your stagnation matches the same shape.`
521537
+ ].join("\n");
521538
+ }
521539
+ }
521540
+ messages2.push({ role: "system", content: _stagBody });
521515
521541
  stagnationCooldownUntilTurn = turn + 5;
521516
521542
  this.emit({
521517
521543
  type: "status",
@@ -522351,10 +522377,31 @@ ${memoryLines.join("\n")}`
522351
522377
  if (_reflEntry) {
522352
522378
  this._reflectionsInjectedThisTurn.add(_reflStem);
522353
522379
  const _isEscalation = _reflEntry.attempts >= 3 || (_reflEntry.errorSignatures?.size ?? 0) >= 3;
522380
+ let _reflBody = renderReflectionMessage(_reflEntry);
522381
+ if (this._runLessons.length > 0) {
522382
+ const _query = `${this._taskState.goal || ""} ${_reflEntry.wentWrong}`;
522383
+ const _topLessons = select2({
522384
+ goal: _query,
522385
+ lessons: this._runLessons,
522386
+ k: 1
522387
+ });
522388
+ if (_topLessons.length > 0) {
522389
+ const _l = _topLessons[0];
522390
+ _reflBody += [
522391
+ ``,
522392
+ `[INTRA-RUN LESSON — REG-36b]`,
522393
+ `Earlier in THIS run you encountered a similar pattern:`,
522394
+ ` Failed: ${_l.whatFailed.slice(0, 150)}`,
522395
+ ` Worked: ${_l.whatWorked.slice(0, 150)}`,
522396
+ ` Hypothesis: ${_l.hypothesis.slice(0, 150)}`,
522397
+ `Apply that lesson here if applicable.`
522398
+ ].join("\n");
522399
+ }
522400
+ }
522354
522401
  if (_isEscalation) {
522355
- messages2.push({ role: "system", content: renderReflectionMessage(_reflEntry) });
522402
+ messages2.push({ role: "system", content: _reflBody });
522356
522403
  } else {
522357
- pushSoftInjection("system", renderReflectionMessage(_reflEntry));
522404
+ pushSoftInjection("system", _reflBody);
522358
522405
  }
522359
522406
  }
522360
522407
  }
@@ -522919,9 +522966,13 @@ ${criticDecision.cachedResult.slice(0, 500)}` : `[BLOCKED — the observer confi
522919
522966
  successOutputPreview: (result.output ?? "").slice(0, 200)
522920
522967
  });
522921
522968
  bank(_lesson, this._workingDirectory || void 0);
522969
+ this._runLessons.push(_lesson);
522970
+ if (this._runLessons.length > 20) {
522971
+ this._runLessons = this._runLessons.slice(-20);
522972
+ }
522922
522973
  this.emit({
522923
522974
  type: "status",
522924
- content: `REG-36: lesson banked (failure→success on ${_stem.slice(0, 60)}; prior attempts=${_priorReflection.attempts})`,
522975
+ content: `REG-36: lesson banked (failure→success on ${_stem.slice(0, 60)}; prior attempts=${_priorReflection.attempts}; in-memory bank size=${this._runLessons.length})`,
522925
522976
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
522926
522977
  });
522927
522978
  } catch {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.484",
3
+ "version": "0.187.485",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "open-agents-ai",
9
- "version": "0.187.484",
9
+ "version": "0.187.485",
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.484",
3
+ "version": "0.187.485",
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",