open-agents-ai 0.187.297 → 0.187.299
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 +56 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -271259,7 +271259,7 @@ ${memoryLines.join("\n")}`
|
|
|
271259
271259
|
if (cohort && cohort.failure >= 3 && cohort.success === 0) {
|
|
271260
271260
|
this.emit({ type: "observer_reaction", timestamp: (/* @__PURE__ */ new Date()).toISOString(), observer: { class: "arg_cohort_risk", shortText: `${tc.name} with similar args has failed ${cohort.failure}× recently`, confidence: 0.85 } });
|
|
271261
271261
|
if (this._observerMode === "skillcoach" || this._observerMode === "both") {
|
|
271262
|
-
this.pendingUserMessages.push(
|
|
271262
|
+
this.pendingUserMessages.push(`⚠ ${tc.name} with similar arguments has failed ${cohort.failure}× recently. Try a different approach first: read relevant files, adjust arguments, or verify prerequisites.`);
|
|
271263
271263
|
}
|
|
271264
271264
|
}
|
|
271265
271265
|
if (this._errorPatterns.size > 0) {
|
|
@@ -273332,11 +273332,11 @@ ${trimmedNew}`;
|
|
|
273332
273332
|
const successList = successes.map((o2) => `${o2.tool}: ${o2.preview.slice(0, 60)}`).join("; ");
|
|
273333
273333
|
emitReaction("false_failure", `Claimed failure, but recent tools succeeded (${successes.length})`, 0.9, successList);
|
|
273334
273334
|
if (this._observerMode === "skillcoach" || this._observerMode === "both") {
|
|
273335
|
-
this.pendingUserMessages.push(
|
|
273335
|
+
this.pendingUserMessages.push(`⚠ Correction: recent tools DID succeed. Do not retry them. Successful results: ${successList}. Use them to advance the task.`);
|
|
273336
273336
|
}
|
|
273337
273337
|
this.emit({
|
|
273338
273338
|
type: "status",
|
|
273339
|
-
content:
|
|
273339
|
+
content: `\x1B[38;5;178m⚠ Corrected false failure claim (${successes.length} tools succeeded)\x1B[0m`,
|
|
273340
273340
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
273341
273341
|
});
|
|
273342
273342
|
}
|
|
@@ -273353,7 +273353,7 @@ ${trimmedNew}`;
|
|
|
273353
273353
|
const failList = failures.map((o2) => `${o2.tool}: ${o2.preview.slice(0, 60)}`).join("; ");
|
|
273354
273354
|
emitReaction("false_success", `Claimed success, but recent tools failed (${failures.length})`, 0.9, failList);
|
|
273355
273355
|
if (this._observerMode === "skillcoach" || this._observerMode === "both") {
|
|
273356
|
-
this.pendingUserMessages.push(
|
|
273356
|
+
this.pendingUserMessages.push(`⚠ Your recent tools show errors (${failures.length}). Verify the last tool output and correct the issue before claiming success.`);
|
|
273357
273357
|
}
|
|
273358
273358
|
}
|
|
273359
273359
|
}
|
|
@@ -273371,11 +273371,11 @@ ${trimmedNew}`;
|
|
|
273371
273371
|
if (prior) {
|
|
273372
273372
|
emitReaction("redundant_action", `Already ran ${name11} successfully on turn ${prior.turn}`, 0.8, prior.preview);
|
|
273373
273373
|
if (this._observerMode === "skillcoach" || this._observerMode === "both") {
|
|
273374
|
-
this.pendingUserMessages.push(
|
|
273374
|
+
this.pendingUserMessages.push(`⚠ You already ran ${name11} successfully on turn ${prior.turn} with similar arguments. Do NOT re-run it. Use the existing result and proceed.`);
|
|
273375
273375
|
}
|
|
273376
273376
|
this.emit({
|
|
273377
273377
|
type: "status",
|
|
273378
|
-
content:
|
|
273378
|
+
content: `\x1B[38;5;178m⚠ Prevented redundant ${name11} call (succeeded on turn ${prior.turn})\x1B[0m`,
|
|
273379
273379
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
273380
273380
|
});
|
|
273381
273381
|
break;
|
|
@@ -273396,11 +273396,11 @@ ${trimmedNew}`;
|
|
|
273396
273396
|
if (consecutiveShortResults >= 3) {
|
|
273397
273397
|
emitReaction("idle_think", `Consecutive output without input: ${consecutiveShortResults}`, 0.7);
|
|
273398
273398
|
if (this._observerMode === "skillcoach" || this._observerMode === "both") {
|
|
273399
|
-
this.pendingUserMessages.push(
|
|
273399
|
+
this.pendingUserMessages.push(`⚠ You have sent ${consecutiveShortResults} consecutive outputs without reading any input. Alternate: receive input, then respond. Call your input tool now.`);
|
|
273400
273400
|
}
|
|
273401
273401
|
this.emit({
|
|
273402
273402
|
type: "status",
|
|
273403
|
-
content:
|
|
273403
|
+
content: `\x1B[38;5;178m⚠ Blocked runaway output (${consecutiveShortResults} consecutive sends without receive)\x1B[0m`,
|
|
273404
273404
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
273405
273405
|
});
|
|
273406
273406
|
}
|
|
@@ -286373,6 +286373,19 @@ var init_status_bar = __esm({
|
|
|
286373
286373
|
get focusedZone() {
|
|
286374
286374
|
return this._focusedZone;
|
|
286375
286375
|
}
|
|
286376
|
+
/**
|
|
286377
|
+
* Clear the scrollback/history for the active view and repaint the
|
|
286378
|
+
* content area. Keeps header/footer intact. Use for /clear and
|
|
286379
|
+
* when starting a new session so stale lines don't linger.
|
|
286380
|
+
*/
|
|
286381
|
+
clearHistory() {
|
|
286382
|
+
this._contentLines.splice(0, this._contentLines.length);
|
|
286383
|
+
this._contentScrollOffset = 0;
|
|
286384
|
+
this._inProgressLine = "";
|
|
286385
|
+
this._autoScroll = true;
|
|
286386
|
+
this.fillContentArea();
|
|
286387
|
+
this.renderFooterAndPositionInput();
|
|
286388
|
+
}
|
|
286376
286389
|
/** Set callback for header focus changes (wired by interactive.ts to banner) */
|
|
286377
286390
|
setHeaderFocusHandler(handler) {
|
|
286378
286391
|
this._headerFocusHandler = handler;
|
|
@@ -300140,6 +300153,11 @@ async function showSessionsMenu(ctx3) {
|
|
|
300140
300153
|
detail: `${date} | ${tasks} | ${s2.model}`
|
|
300141
300154
|
};
|
|
300142
300155
|
});
|
|
300156
|
+
items.push({
|
|
300157
|
+
key: "__new__",
|
|
300158
|
+
label: "New session",
|
|
300159
|
+
detail: "Start a fresh session and clear the TUI history"
|
|
300160
|
+
});
|
|
300143
300161
|
const result = await tuiSelect({
|
|
300144
300162
|
items,
|
|
300145
300163
|
title: "Session History",
|
|
@@ -300149,6 +300167,11 @@ async function showSessionsMenu(ctx3) {
|
|
|
300149
300167
|
}
|
|
300150
300168
|
});
|
|
300151
300169
|
if (!result || result.key === "cancel") return;
|
|
300170
|
+
if (result.key === "__new__") {
|
|
300171
|
+
if (ctx3.newSession) ctx3.newSession();
|
|
300172
|
+
else ctx3.clearScreen();
|
|
300173
|
+
return;
|
|
300174
|
+
}
|
|
300152
300175
|
const content = loadSessionHistory(ctx3.repoRoot, result.key);
|
|
300153
300176
|
if (!content || content.length === 0) {
|
|
300154
300177
|
renderWarning2("Session content not found or empty.");
|
|
@@ -332895,7 +332918,10 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
332895
332918
|
writeToNeovimOutput("[screen cleared]\n");
|
|
332896
332919
|
return;
|
|
332897
332920
|
}
|
|
332898
|
-
|
|
332921
|
+
try {
|
|
332922
|
+
statusBar.clearHistory();
|
|
332923
|
+
} catch {
|
|
332924
|
+
}
|
|
332899
332925
|
renderCompactHeader(currentConfig2.model);
|
|
332900
332926
|
if (statusBar.isActive) statusBar.handleResize();
|
|
332901
332927
|
},
|
|
@@ -332924,6 +332950,27 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
332924
332950
|
banner.stop();
|
|
332925
332951
|
if (carousel.isRunning) carousel.stop();
|
|
332926
332952
|
},
|
|
332953
|
+
newSession() {
|
|
332954
|
+
const newId = `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
332955
|
+
try {
|
|
332956
|
+
process.env["OA_SESSION_ID"] = newId;
|
|
332957
|
+
} catch {
|
|
332958
|
+
}
|
|
332959
|
+
try {
|
|
332960
|
+
setTodoSessionId(newId);
|
|
332961
|
+
} catch {
|
|
332962
|
+
}
|
|
332963
|
+
try {
|
|
332964
|
+
setTuiTasksSession(newId);
|
|
332965
|
+
} catch {
|
|
332966
|
+
}
|
|
332967
|
+
try {
|
|
332968
|
+
statusBar.clearHistory();
|
|
332969
|
+
} catch {
|
|
332970
|
+
}
|
|
332971
|
+
renderInfo2(`Started new session: ${newId}`);
|
|
332972
|
+
if (statusBar.isActive) statusBar.handleResize();
|
|
332973
|
+
},
|
|
332927
332974
|
killEphemeral() {
|
|
332928
332975
|
if (_shellToolRef) _shellToolRef.killAll();
|
|
332929
332976
|
killAllFullSubAgents();
|
package/package.json
CHANGED