(sessionId: string, run: AgentRun)
| 3091 | } |
| 3092 | |
| 3093 | private async settleRunStopOperation(sessionId: string, run: AgentRun): Promise<void> { |
| 3094 | const operation = this.stopOperations.get(sessionId); |
| 3095 | if ( |
| 3096 | !operation || |
| 3097 | ![...operation.targets.values()].some((target) => target.runs.get(run.runId)?.run === run) |
| 3098 | ) { |
| 3099 | return; |
| 3100 | } |
| 3101 | try { |
| 3102 | await this.enqueueStopOperation(sessionId, operation, {}, false); |
| 3103 | } catch { |
| 3104 | // A later public retry continues the retained canonical projection. |
| 3105 | } finally { |
| 3106 | this.releaseStoppedRunReferences(operation, run); |
| 3107 | } |
| 3108 | } |
| 3109 | |
| 3110 | private releaseStoppedRunReferences(operation: StopOperation, run: AgentRun): void { |
| 3111 | for (const target of operation.targets.values()) { |
no test coverage detected