feat: run doctor after restart

This commit is contained in:
Peter Steinberger
2026-01-10 23:14:55 +01:00
parent 4eb6aec016
commit 494743a4e5
6 changed files with 74 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ import {
import { buildConfigSchema } from "../../config/schema.js";
import { scheduleGatewaySigusr1Restart } from "../../infra/restart.js";
import {
DOCTOR_NONINTERACTIVE_HINT,
type RestartSentinelPayload,
writeRestartSentinel,
} from "../../infra/restart-sentinel.js";
@@ -176,6 +177,7 @@ export const configHandlers: GatewayRequestHandlers = {
ts: Date.now(),
sessionKey,
message: note ?? null,
doctorHint: DOCTOR_NONINTERACTIVE_HINT,
stats: {
mode: "config.apply",
root: CONFIG_PATH_CLAWDBOT,

View File

@@ -1,6 +1,7 @@
import { resolveClawdbotPackageRoot } from "../../infra/clawdbot-root.js";
import { scheduleGatewaySigusr1Restart } from "../../infra/restart.js";
import {
DOCTOR_NONINTERACTIVE_HINT,
type RestartSentinelPayload,
writeRestartSentinel,
} from "../../infra/restart-sentinel.js";
@@ -76,6 +77,7 @@ export const updateHandlers: GatewayRequestHandlers = {
ts: Date.now(),
sessionKey,
message: note ?? null,
doctorHint: DOCTOR_NONINTERACTIVE_HINT,
stats: {
mode: result.mode,
root: result.root ?? undefined,