* Engine-only: register the catch-up sync promise so the next `execute()` * call awaits it before serving. The handler swallows rejections (the * engine logs them) so a sync failure never propagates as a tool error; * we still want to serve a best-effort result over the same potentially-
(p: Promise<void> | null)
| 2201 | * stale data, which is what would have happened without the gate. |
| 2202 | */ |
| 2203 | setCatchUpGate(p: Promise<void> | null): void { |
| 2204 | this.catchUpGate = p; |
| 2205 | void p?.then(() => { |
| 2206 | if (this.catchUpGate === p) this.catchUpGate = null; |
| 2207 | }, () => { |
| 2208 | if (this.catchUpGate === p) this.catchUpGate = null; |
| 2209 | }); |
| 2210 | } |
| 2211 | |
| 2212 | /** |
| 2213 | * Engine-only: called after a tool call's {@link freshen} reopened a database |
no outgoing calls
no test coverage detected