Files
openclaw/src/cli/gateway-cli/lifecycle.runtime.ts
ghitafilali b2c5e790b4 fix: restart gateway after isolated cron setup timeout
Restart the gateway after isolated cron setup timeouts and harden stale cron-task finalization around restart/reload boundaries.

Verification: focused cron/tasks/CLI regression suites, gateway filesystem/session regression suite, test typecheck, core lint shards, git diff --check, autoreview, Blacksmith Testbox changed gate tbx_01kv2srgbex71w9ce5rwv2wtr4, and clean GitHub PR checks on 13d06b5d6f.
2026-06-14 18:26:27 +08:00

50 lines
2.0 KiB
TypeScript

// Lazy lifecycle runtime export hub used by gateway run-loop restart paths.
export {
abortEmbeddedAgentRun,
getActiveEmbeddedRunCount,
listActiveEmbeddedRunSessionIds,
listActiveEmbeddedRunSessionKeys,
waitForActiveEmbeddedRuns,
} from "../../agents/embedded-agent-runner/runs.js";
export { markRestartAbortedMainSessions } from "../../agents/main-session-restart-recovery.js";
export { getRuntimeConfig } from "../../config/config.js";
export {
respawnGatewayProcessForUpdate,
restartGatewayProcessWithFreshPid,
} from "../../infra/process-respawn.js";
export {
resolveGatewayRestartDeferralTimeoutMs,
consumeGatewayRestartIntentPayloadSync,
consumeGatewaySigusr1RestartIntent,
consumeGatewayRestartIntentSync,
consumeGatewaySigusr1RestartAuthorization,
isGatewaySigusr1RestartExternallyAllowed,
markGatewaySigusr1RestartHandled,
peekGatewaySigusr1RestartReason,
resetGatewayRestartStateForInProcessRestart,
scheduleGatewaySigusr1Restart,
} from "../../infra/restart.js";
export { writeGatewayRestartHandoffSync } from "../../infra/restart-handoff.js";
export { rotateAgentEventLifecycleGeneration } from "../../infra/agent-events.js";
export { markUpdateRestartSentinelFailure } from "../../infra/restart-sentinel.js";
export { detectRespawnSupervisor } from "../../infra/supervisor-markers.js";
export { writeDiagnosticStabilityBundleForFailureSync } from "../../logging/diagnostic-stability-bundle.js";
export {
advanceCronActiveJobGeneration,
resetCronActiveJobs,
waitForActiveCronJobs,
} from "../../cron/active-jobs.js";
export {
abortActiveCronTaskRuns,
retireActiveCronTaskRunTracking,
waitForActiveCronTaskRuns,
} from "../../tasks/cron-task-cancel.js";
export {
getActiveTaskCount,
markGatewayDraining,
resetAllLanes,
waitForActiveTasks,
} from "../../process/command-queue.js";
export { getInspectableActiveTaskRestartBlockers } from "../../tasks/task-registry.maintenance.js";
export { reloadTaskRegistryFromStore } from "../../tasks/runtime-internal.js";