Reload daemon configuration without restarting (#3365)
* feat(daemon): reload configuration without restarting Keep config validation, reloadability classification, override handling, and atomic runtime application inside the daemon so local and remote clients share one authoritative workflow. * fix(daemon): preserve reload resource ownership Keep every materialized provider client under daemon-lifetime ownership and classify speech overrides from resolved providers. Restore the complete WebSocket config-store test contract exposed by CI.
This commit is contained in:
@@ -84,6 +84,7 @@ import type {
|
||||
ProviderUsageListResponseMessage,
|
||||
DaemonGetStatusResponse,
|
||||
DaemonGetPairingOfferResponse,
|
||||
DaemonConfigReloadResponse,
|
||||
DiagnosticsResponse,
|
||||
AgentRewindResponseMessage,
|
||||
ListTerminalsResponse,
|
||||
@@ -4552,6 +4553,14 @@ export class DaemonClient {
|
||||
});
|
||||
}
|
||||
|
||||
async reloadDaemonConfig(requestId?: string): Promise<DaemonConfigReloadResponse["payload"]> {
|
||||
this.requireDaemonConfigReloadSupport();
|
||||
return this.sendNamespacedCorrelatedSessionRequest({
|
||||
requestId,
|
||||
message: { type: "daemon.config.reload.request" },
|
||||
});
|
||||
}
|
||||
|
||||
async connectHub(hubUrl: string, token: string, requestId?: string) {
|
||||
this.requireHubRelationshipSupport();
|
||||
return this.sendCorrelatedSessionRequest({
|
||||
@@ -5333,6 +5342,13 @@ export class DaemonClient {
|
||||
}
|
||||
}
|
||||
|
||||
private requireDaemonConfigReloadSupport(): void {
|
||||
// COMPAT(daemonConfigReload): added in v0.4.0, remove gate after 2027-02-14.
|
||||
if (this.lastServerInfoMessage?.features?.daemonConfigReload !== true) {
|
||||
throw new Error("Update the host to reload daemon configuration.");
|
||||
}
|
||||
}
|
||||
|
||||
private resolveTransportUrlForAttempt(): string {
|
||||
return this.config.url;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user