Document deferred OpenCode restart contract and drop dead helper.

Add config-mutation-response.js to owning docs, describe restartDeferred
and external requiresManualRestart on /api/config/reload, and remove the
unused buildConfigMutationResponse export.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-08-03 12:03:37 +00:00
co-authored by Serhii Dziupin
parent 3cb02439ea
commit 395e08c683
2 changed files with 8 additions and 20 deletions
@@ -24,21 +24,3 @@ export function buildExternalManualRestartResponse(message) {
message,
};
}
export function buildConfigMutationResponse(refreshResult, { liveMessage, manualRestartMessage, deferredMessage }) {
if (refreshResult && refreshResult.external) {
return buildExternalManualRestartResponse(manualRestartMessage);
}
// When callers skip the live refresh (deferred apply flow), report a pending restart.
if (!refreshResult || refreshResult.deferred === true) {
return buildDeferredRestartResponse(deferredMessage || liveMessage);
}
return {
success: true,
requiresReload: true,
message: liveMessage,
reloadDelayMs: refreshResult.reloadDelayMs,
};
}