Retire legacy remote listeners after verifying MCP feature coverage
CI / verify (push) Canceled after 0s
CI / verify (push) Canceled after 0s
This commit is contained in:
1 parent
93e0196dbe
commit
53706c44ea
12 files changed
+50
-829
No files matched your search
+6
-32
@@ -108,23 +108,6 @@ const DEFAULTS = {
|
||||
paused: false,
|
||||
pausedAt: null
|
||||
},
|
||||
remote: {
|
||||
enabled: false,
|
||||
port: 9100,
|
||||
token: '',
|
||||
allowInput: true
|
||||
},
|
||||
diagnostics: {
|
||||
enabled: false,
|
||||
port: 9110,
|
||||
token: '',
|
||||
label: '',
|
||||
codeIssuedAt: 0,
|
||||
bindMode: 'local',
|
||||
publicHost: '',
|
||||
allowlist: [],
|
||||
bindAddress: '127.0.0.1'
|
||||
}
|
||||
},
|
||||
history: [],
|
||||
rotationCursors: {}
|
||||
@@ -466,6 +449,8 @@ class ConfigStore {
|
||||
globalSettings[key] = { ...def, ...(savedGlobal[key] || {}) };
|
||||
}
|
||||
}
|
||||
delete globalSettings.remote;
|
||||
delete globalSettings.diagnostics;
|
||||
// Normalize logMode at this single boundary. Legacy sessionLog: true
|
||||
// means *daily* (the old field was named after a misnomer); see log-mode.js.
|
||||
// Downstream readers consume logMode only and must NOT derive from
|
||||
@@ -499,6 +484,8 @@ class ConfigStore {
|
||||
_serializeForDisk(config) {
|
||||
const hosters = this._clone(config.hosters || {});
|
||||
const globalSettings = this._clone(config.globalSettings || {});
|
||||
delete globalSettings.remote;
|
||||
delete globalSettings.diagnostics;
|
||||
delete globalSettings.allowPlaintextCredentialStorage;
|
||||
secretStore.encryptCredentials({ hosters, globalSettings });
|
||||
return JSON.stringify({ ...config, globalSettings, hosters }, null, 2);
|
||||
@@ -712,8 +699,6 @@ class ConfigStore {
|
||||
return this._enqueueWrite(() => {
|
||||
const current = this.load();
|
||||
const currentGlobalSettings = current.globalSettings || {};
|
||||
const currentRemote = currentGlobalSettings.remote || {};
|
||||
const incomingRemote = snapshot.remote || {};
|
||||
const currentFolderMonitor = currentGlobalSettings.folderMonitor || {};
|
||||
const incomingFolderMonitor = snapshot.folderMonitor || {};
|
||||
current.globalSettings = {
|
||||
@@ -721,7 +706,6 @@ class ConfigStore {
|
||||
pendingQueue: currentGlobalSettings.pendingQueue ?? null,
|
||||
uploadRecovery: currentGlobalSettings.uploadRecovery ?? null,
|
||||
lastBrowseDirectory: currentGlobalSettings.lastBrowseDirectory || '',
|
||||
diagnostics: this._clone(currentGlobalSettings.diagnostics || {}),
|
||||
cloudLogSync: this._clone(currentGlobalSettings.cloudLogSync || {}),
|
||||
historyRetention: currentGlobalSettings.historyRetention || 'all',
|
||||
folderMonitor: {
|
||||
@@ -729,10 +713,6 @@ class ConfigStore {
|
||||
...incomingFolderMonitor,
|
||||
paused: currentFolderMonitor.paused === true,
|
||||
pausedAt: currentFolderMonitor.pausedAt ?? null
|
||||
},
|
||||
remote: {
|
||||
...incomingRemote,
|
||||
token: incomingRemote.token || currentRemote.token || ''
|
||||
}
|
||||
};
|
||||
this._guardHosters(current, false);
|
||||
@@ -749,18 +729,12 @@ class ConfigStore {
|
||||
});
|
||||
}
|
||||
|
||||
saveRemoteSettings(remoteSettings, createToken) {
|
||||
const incoming = this._clone(remoteSettings || {});
|
||||
saveRemoteSettings() {
|
||||
return this._enqueueWrite(async () => {
|
||||
const current = this.load();
|
||||
const currentGlobalSettings = current.globalSettings || {};
|
||||
const currentRemote = currentGlobalSettings.remote || {};
|
||||
const token = incoming.token || currentRemote.token || (incoming.enabled && typeof createToken === 'function' ? createToken() : '');
|
||||
const canonical = { ...incoming, token };
|
||||
current.globalSettings = { ...currentGlobalSettings, remote: canonical };
|
||||
this._guardHosters(current, false);
|
||||
await this._commit(current);
|
||||
return this._clone(canonical);
|
||||
return { enabled: false, retired: true, token: '' };
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user