teapot-coding-agent 0.37.37 → 0.37.38
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/master.js +18 -1
- package/package.json +1 -1
- package/public/assets/{index-CXHfZOPq.js → index-DZteXB3h.js} +4 -4
- package/public/assets/{index-CXHfZOPq.js.map → index-DZteXB3h.js.map} +1 -1
- package/public/assets/{shiki-CsPs6x4K.js → shiki-CCocHZ4i.js} +2 -2
- package/public/assets/{shiki-CsPs6x4K.js.map → shiki-CCocHZ4i.js.map} +1 -1
- package/public/index.html +1 -1
package/dist/master.js
CHANGED
|
@@ -2596,8 +2596,25 @@ When this task is done (or truly blocked), call finish() with a summary for @${p
|
|
|
2596
2596
|
}
|
|
2597
2597
|
async restartServer() {
|
|
2598
2598
|
console.log("[teapot] live update: restarting...");
|
|
2599
|
-
|
|
2599
|
+
/**
|
|
2600
|
+
* A Ctrl-C from here until the exec is ambiguous; signal handlers consult this.
|
|
2601
|
+
*
|
|
2602
|
+
* Every early RETURN below clears it again. `execve` only resolves if it FAILED, and the
|
|
2603
|
+
* `!execve` branch throws — on either path the process keeps running, so leaving the flag set
|
|
2604
|
+
* would make the FIRST ^C refuse forever with a message that promises a second one works. The
|
|
2605
|
+
* flag is therefore a promise about the CURRENT moment, not a one-way switch.
|
|
2606
|
+
*/
|
|
2600
2607
|
this.updateInFlight = true;
|
|
2608
|
+
try {
|
|
2609
|
+
await this.handoverToNewImage();
|
|
2610
|
+
}
|
|
2611
|
+
finally {
|
|
2612
|
+
// only reached when the handover did NOT replace the process
|
|
2613
|
+
this.updateInFlight = false;
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
/** wind down, record what to resume, and exec. Never returns on success. */
|
|
2617
|
+
async handoverToNewImage() {
|
|
2601
2618
|
/**
|
|
2602
2619
|
* 1. WIND DOWN — do not abort.
|
|
2603
2620
|
*
|