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 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
- // a Ctrl-C from here until the exec is ambiguous; signal handlers consult this
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
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teapot-coding-agent",
3
- "version": "0.37.37",
3
+ "version": "0.37.38",
4
4
  "description": "A lightweight, always-on multi-agent harness for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-or-later",