feat(config): persist config.patch updates atomically

This commit is contained in:
William Valentin
2026-02-15 22:03:21 -08:00
parent c314e0f067
commit 0220ec10dd
13 changed files with 205 additions and 11 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ export async function runSetup(configPath: string): Promise<void> {
const { startDaemon } = await import('../daemon/index.js');
const { loadConfig } = await import('../config/index.js');
const config = loadConfig(configPath);
const daemon = await startDaemon(config);
const daemon = await startDaemon(config, { configPath });
await new Promise<void>(resolve => daemon.lifecycle.onShutdown(async () => resolve()));
return;
}
+1 -1
View File
@@ -44,7 +44,7 @@ export function registerStartCommand(program: Command): void {
// Dynamic import to avoid loading daemon code for other commands
const { startDaemon } = await import('../daemon/index.js');
const daemon = await startDaemon(config);
const daemon = await startDaemon(config, { configPath });
if (config.telegram) {
console.log(`Allowed Telegram chat IDs: ${config.telegram.allowed_chat_ids.join(', ')}`);