mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:50:43 +00:00
fix(plugin-sdk): keep harness timeout flag optional
Keep the new attempt-result field optional for third-party harness compatibility while defaulting absent values at the runner boundary. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1133,12 +1133,15 @@ export async function runEmbeddedPiAgent(
|
||||
timedOut,
|
||||
idleTimedOut,
|
||||
timedOutDuringCompaction,
|
||||
timedOutDuringToolExecution,
|
||||
sessionIdUsed,
|
||||
sessionFileUsed,
|
||||
lastAssistant: sessionLastAssistant,
|
||||
currentAttemptAssistant,
|
||||
} = attempt;
|
||||
// Field is optional in the public harness SDK contract; default to
|
||||
// false here so internal code can rely on a strict boolean. Internal
|
||||
// embedded-runner attempt sets this explicitly. See #52147.
|
||||
const timedOutDuringToolExecution = attempt.timedOutDuringToolExecution ?? false;
|
||||
if (sessionIdUsed && sessionIdUsed !== activeSessionId) {
|
||||
activeSessionId = sessionIdUsed;
|
||||
}
|
||||
|
||||
@@ -62,8 +62,13 @@ export type EmbeddedRunAttemptResult = {
|
||||
* True if the run-level timer fired while at least one tool execution was
|
||||
* still in flight. The LLM had already responded; the timeout is unrelated
|
||||
* to the primary model and must not trigger model fallback. Closes #52147.
|
||||
*
|
||||
* Optional for plugin-SDK back-compat: this type is re-exported as
|
||||
* `AgentHarnessAttemptResult` and third-party harnesses cannot necessarily
|
||||
* observe in-flight tool state. Treat absent as `false` at the runner
|
||||
* boundary; internal embedded-runner code always sets it explicitly.
|
||||
*/
|
||||
timedOutDuringToolExecution: boolean;
|
||||
timedOutDuringToolExecution?: boolean;
|
||||
promptError: unknown;
|
||||
/**
|
||||
* Identifies which phase produced the promptError.
|
||||
|
||||
Reference in New Issue
Block a user