@leanandmean/coding-agent 0.74.1-scramjet.14 → 0.74.1-scramjet.16
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/core/agent-session.d.ts +2 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +16 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +28 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +4 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts +2 -0
- package/dist/utils/pi-user-agent.d.ts.map +1 -0
- package/dist/utils/pi-user-agent.js +5 -0
- package/dist/utils/pi-user-agent.js.map +1 -0
- package/dist/utils/user-agent.d.ts +2 -0
- package/dist/utils/user-agent.d.ts.map +1 -0
- package/dist/utils/user-agent.js +6 -0
- package/dist/utils/user-agent.js.map +1 -0
- package/package.json +1 -1
|
@@ -80,6 +80,7 @@ export class AgentSession {
|
|
|
80
80
|
// Retry state
|
|
81
81
|
_retryAbortController = undefined;
|
|
82
82
|
_retryAttempt = 0;
|
|
83
|
+
_runRetryCount = 0;
|
|
83
84
|
_retryPromise = undefined;
|
|
84
85
|
_retryResolve = undefined;
|
|
85
86
|
// Bash execution state
|
|
@@ -853,6 +854,7 @@ export class AgentSession {
|
|
|
853
854
|
return;
|
|
854
855
|
}
|
|
855
856
|
preflightResult?.(true);
|
|
857
|
+
this._runRetryCount = 0;
|
|
856
858
|
await this.agent.prompt(messages);
|
|
857
859
|
await this.waitForRetry();
|
|
858
860
|
}
|
|
@@ -2016,6 +2018,19 @@ export class AgentSession {
|
|
|
2016
2018
|
});
|
|
2017
2019
|
}
|
|
2018
2020
|
this._retryAttempt++;
|
|
2021
|
+
this._runRetryCount++;
|
|
2022
|
+
const cumulativeCap = settings.maxRetries * 2;
|
|
2023
|
+
if (this._runRetryCount > cumulativeCap) {
|
|
2024
|
+
this._emit({
|
|
2025
|
+
type: "auto_retry_end",
|
|
2026
|
+
success: false,
|
|
2027
|
+
attempt: this._runRetryCount - 1,
|
|
2028
|
+
finalError: `Repeated retry failures (${this._runRetryCount - 1} total attempts this prompt). ${message.errorMessage ?? ""}`.trim(),
|
|
2029
|
+
});
|
|
2030
|
+
this._retryAttempt = 0;
|
|
2031
|
+
this._resolveRetry();
|
|
2032
|
+
return false;
|
|
2033
|
+
}
|
|
2019
2034
|
if (this._retryAttempt > settings.maxRetries) {
|
|
2020
2035
|
// Max retries exceeded, emit final failure and reset
|
|
2021
2036
|
this._emit({
|
|
@@ -2035,6 +2050,7 @@ export class AgentSession {
|
|
|
2035
2050
|
maxAttempts: settings.maxRetries,
|
|
2036
2051
|
delayMs,
|
|
2037
2052
|
errorMessage: message.errorMessage || "Unknown error",
|
|
2053
|
+
cumulativeErrors: this._runRetryCount,
|
|
2038
2054
|
});
|
|
2039
2055
|
// Remove error message from agent state (keep in session for history)
|
|
2040
2056
|
const messages = this.agent.state.messages;
|