@chrysb/alphaclaw 0.1.6 → 0.1.7

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.
@@ -1,5 +1,4 @@
1
1
  const { exec } = require("child_process");
2
- const { spawn } = require("child_process");
3
2
  const fs = require("fs");
4
3
  const path = require("path");
5
4
  const https = require("https");
@@ -132,13 +131,12 @@ const createAlphaclawVersionService = () => {
132
131
  });
133
132
 
134
133
  const restartProcess = () => {
135
- console.log("[alphaclaw] Restarting process...");
136
- const child = spawn(process.argv[0], process.argv.slice(1), {
137
- detached: true,
138
- stdio: "inherit",
139
- });
140
- child.unref();
141
- process.exit(0);
134
+ console.log("[alphaclaw] Restarting process (exit 1 to trigger container restart)...");
135
+ // Exit with code 1 so container orchestrators (Railway, Docker restart policy)
136
+ // treat it as a crash and automatically restart the service.
137
+ // The spawned-child approach doesn't work in containers because killing PID 1
138
+ // tears down the entire container.
139
+ process.exit(1);
142
140
  };
143
141
 
144
142
  const getVersionStatus = async (refresh) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrysb/alphaclaw",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },