feat(vault): keep established secrets active at runtime and require unlock only for modifications

This commit is contained in:
tyuXX 2026-11-26 22:25:55 +00:00
parent c5a5835ae6
commit 10a28bb316
14 changed files with 445 additions and 85 deletions

View file

@ -193,7 +193,7 @@ export class ConfigManager {
for (const server of this.servers.values()) {
const relPath = `servers/${server.id}.json`;
if (this.vault && this.vault.state === 'unlocked') {
if (this.vault && this.vault.isRuntimeReady) {
if (!this.vault.hasCredential(server.credentialId)) {
next.push({
filePath: relPath,
@ -297,7 +297,7 @@ export class ConfigManager {
// 3. Alerts cross-references
const channelIds = new Set(this.alerts.channels.map((c) => c.id));
if (this.vault && this.vault.state === 'unlocked') {
if (this.vault && this.vault.isRuntimeReady) {
for (const ch of this.alerts.channels) {
if (!this.vault.hasCredential(ch.secretRef)) {
next.push({