修之:重中止缘由于阻塞周期 · openclaw/openclaw@fc4bd44
steipete
·
2026-05-24
·
via Recent Commits to openclaw:main
| 原本之文件行數 | 差異行數 | 差異變更 |
|---|
@@ -1009,6 +1009,7 @@ describe("subagent registry seam flow", () => {
|
1009 | 1009 | startedAt: 10, |
1010 | 1010 | endedAt: 20, |
1011 | 1011 | aborted: true, |
| 1012 | +livenessState: "blocked", |
1012 | 1013 | stopReason: "aborted", |
1013 | 1014 | }, |
1014 | 1015 | }); |
|
| 原本之文件行數 | 差異行數 | 差異變更 |
|---|
@@ -999,34 +999,34 @@ function ensureListener() {
|
999 | 999 | }); |
1000 | 1000 | return; |
1001 | 1001 | } |
1002 | | -if (isBlockedLivenessState(livenessState)) { |
| 1002 | +if (isAbortedAgentStopReason(stopReason)) { |
1003 | 1003 | clearPendingLifecycleError(evt.runId); |
1004 | 1004 | clearPendingLifecycleTimeout(evt.runId); |
1005 | 1005 | await completeSubagentRun({ |
1006 | 1006 | runId: evt.runId, |
1007 | 1007 | endedAt, |
1008 | 1008 | outcome: { |
1009 | 1009 | status: "error", |
1010 | | -error: formatBlockedLivenessError(error), |
| 1010 | +error: "subagent run terminated", |
1011 | 1011 | }, |
1012 | | -reason: SUBAGENT_ENDED_REASON_ERROR, |
| 1012 | +reason: SUBAGENT_ENDED_REASON_KILLED, |
1013 | 1013 | sendFarewell: true, |
1014 | 1014 | accountId: entry.requesterOrigin?.accountId, |
1015 | 1015 | triggerCleanup: true, |
1016 | 1016 | }); |
1017 | 1017 | return; |
1018 | 1018 | } |
1019 | | -if (isAbortedAgentStopReason(stopReason)) { |
| 1019 | +if (isBlockedLivenessState(livenessState)) { |
1020 | 1020 | clearPendingLifecycleError(evt.runId); |
1021 | 1021 | clearPendingLifecycleTimeout(evt.runId); |
1022 | 1022 | await completeSubagentRun({ |
1023 | 1023 | runId: evt.runId, |
1024 | 1024 | endedAt, |
1025 | 1025 | outcome: { |
1026 | 1026 | status: "error", |
1027 | | -error: "subagent run terminated", |
| 1027 | +error: formatBlockedLivenessError(error), |
1028 | 1028 | }, |
1029 | | -reason: SUBAGENT_ENDED_REASON_KILLED, |
| 1029 | +reason: SUBAGENT_ENDED_REASON_ERROR, |
1030 | 1030 | sendFarewell: true, |
1031 | 1031 | accountId: entry.requesterOrigin?.accountId, |
1032 | 1032 | triggerCleanup: true, |
|
此內容由慣性聚合(RSS閱讀器)自動聚合整理,僅供閱讀參考。 原文來自 — 版權歸原作者所有。