myaiforone 1.1.22 → 1.1.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myaiforone",
3
- "version": "1.1.22",
3
+ "version": "1.1.24",
4
4
  "type": "module",
5
5
  "description": "Routes messages from phone channels to project-specific Claude Code agents",
6
6
  "bin": {
package/public/admin.html CHANGED
@@ -887,6 +887,8 @@ async function checkForUpdates() {
887
887
  }
888
888
 
889
889
  async function applyUpdate() {
890
+ const latest = document.getElementById('latestVersion').textContent;
891
+ if (!confirm('Update MyAIforOne to ' + latest + '?\n\nThe service will restart and be briefly unavailable.')) return;
890
892
  const updateBtn = document.getElementById('updateBtn');
891
893
  const logEl = document.getElementById('updateLog');
892
894
  const badge = document.getElementById('updateBadge');
@@ -110,14 +110,24 @@ namespace MyAIforOne {
110
110
  thread.SetApartmentState(ApartmentState.STA);
111
111
  thread.Start();
112
112
 
113
- // Launch npx
113
+ // Launch npx — must route through cmd.exe because npx is a .cmd
114
+ // shim on Windows; CreateProcess cannot execute .cmd files directly.
114
115
  var npx = new Process();
115
- npx.StartInfo = new ProcessStartInfo("npx", "myaiforone@latest") {
116
+ npx.StartInfo = new ProcessStartInfo("cmd.exe", "/c npx myaiforone@latest") {
116
117
  UseShellExecute = false,
117
118
  CreateNoWindow = true,
118
119
  WindowStyle = ProcessWindowStyle.Hidden
119
120
  };
120
- npx.Start();
121
+ try {
122
+ npx.Start();
123
+ } catch (Exception ex) {
124
+ MessageBox.Show(
125
+ "Failed to start MyAIforOne:\n\n" + ex.Message,
126
+ "MyAIforOne", MessageBoxButtons.OK, MessageBoxIcon.Error);
127
+ if (splashForm != null && !splashForm.IsDisposed)
128
+ splashForm.Invoke(new Action(() => splashForm.Close()));
129
+ return;
130
+ }
121
131
 
122
132
  // Poll health endpoint
123
133
  for (int i = 0; i < 120; i++) {