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
+6 -2
View File
@@ -54,7 +54,11 @@ export interface DaemonContext {
browserManager?: BrowserManager;
}
export async function startDaemon(config: Config): Promise<DaemonContext> {
export interface StartDaemonOptions {
configPath?: string;
}
export async function startDaemon(config: Config, options?: StartDaemonOptions): Promise<DaemonContext> {
// ── Log level ──
setLogLevel(config.log_level);
@@ -144,7 +148,7 @@ export async function startDaemon(config: Config): Promise<DaemonContext> {
let channelAgents: ReturnType<typeof createMessageRouter>['agents'] | null = null;
const gateway = createGateway({
config, sessionManager, modelRouter, systemPrompt, toolRegistry, toolExecutor,
config, configPath: options?.configPath, sessionManager, modelRouter, systemPrompt, toolRegistry, toolExecutor,
channelRegistry, pairingManager, lifecycle, memoryStore,
getChannelAgents: () => channelAgents, commandRegistry, intentRegistry, routingPolicy,
});