@rubytech/taskmaster 1.0.58 → 1.0.59

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,5 @@
1
1
  {
2
- "version": "1.0.58",
2
+ "version": "1.0.59",
3
3
  "commit": "2a1c2ac37038aee2573fee7b793fe2bd24823740",
4
- "builtAt": "2026-02-17T18:47:54.579Z"
4
+ "builtAt": "2026-02-17T18:50:30.628Z"
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { loadConfig } from "../../config/config.js";
2
2
  import { resolveTaskmasterPackageRoot } from "../../infra/taskmaster-root.js";
3
- import { scheduleGatewaySigusr1Restart } from "../../infra/restart.js";
3
+ import { scheduleGatewaySigusr1Restart, triggerTaskmasterRestart, } from "../../infra/restart.js";
4
4
  import { formatDoctorNonInteractiveHint, readRestartSentinel, writeRestartSentinel, } from "../../infra/restart-sentinel.js";
5
5
  import { checkUpdateStatus, compareSemverStrings } from "../../infra/update-check.js";
6
6
  import { normalizeUpdateChannel, resolveEffectiveUpdateChannel, } from "../../infra/update-channels.js";
@@ -222,10 +222,30 @@ export const updateHandlers = {
222
222
  status: result.status,
223
223
  reason: result.reason ?? null,
224
224
  });
225
- const restart = scheduleGatewaySigusr1Restart({
226
- delayMs: restartDelayMs,
227
- reason: "update.run",
228
- });
225
+ // Global installs replace files on disk — need a full daemon restart
226
+ // (in-process SIGUSR1 restart keeps stale module cache).
227
+ // Git installs rebuild in-place and benefit from the fast in-process restart.
228
+ const isGlobalInstall = result.mode === "npm" || result.mode === "pnpm" || result.mode === "bun";
229
+ let restart;
230
+ if (isGlobalInstall && result.status === "ok") {
231
+ // Respond first, then trigger full daemon restart after a short delay
232
+ const delayMs = restartDelayMs ?? 2000;
233
+ setTimeout(() => {
234
+ const attempt = triggerTaskmasterRestart();
235
+ if (!attempt.ok) {
236
+ log.error(`daemon restart failed: ${attempt.detail ?? "unknown"}`);
237
+ // Fall back to in-process restart
238
+ scheduleGatewaySigusr1Restart({ delayMs: 0, reason: "update.run (fallback)" });
239
+ }
240
+ }, delayMs);
241
+ restart = { ok: true };
242
+ }
243
+ else {
244
+ restart = scheduleGatewaySigusr1Restart({
245
+ delayMs: restartDelayMs,
246
+ reason: "update.run",
247
+ });
248
+ }
229
249
  respond(true, {
230
250
  ok: true,
231
251
  result,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/taskmaster",
3
- "version": "1.0.58",
3
+ "version": "1.0.59",
4
4
  "description": "AI-powered business assistant for small businesses",
5
5
  "publishConfig": {
6
6
  "access": "public"