feat(config): support assistant briefing runtime edits and setup defaults

This commit is contained in:
William Valentin
2026-02-18 12:15:37 -08:00
parent 4267eae16c
commit 182827d612
5 changed files with 91 additions and 0 deletions
+11
View File
@@ -68,6 +68,16 @@ describe('setupAutomation', () => {
expect(briefing.enabled).toBe(true);
expect(briefing.schedule).toBe('0 7 * * 1-5');
expect(minioSync.enabled).toBe(true);
expect(automation.delivery_mode).toBe('announce');
expect((config.memory as Record<string, unknown>).daily_log).toEqual({
enabled: true,
namespace_prefix: 'daily',
});
expect((config.memory as Record<string, unknown>).proactive_extract).toEqual({
enabled: true,
min_tool_calls: 1,
namespace: 'global',
});
});
it('allows overriding operator pack output routing', async () => {
@@ -102,6 +112,7 @@ describe('setupAutomation', () => {
expect((heartbeat.notify as Record<string, unknown>).channel).toBe('discord');
expect((briefing.output as Record<string, unknown>).peer).toBe('ops-room');
expect(automation.minio_sync).toBeUndefined();
expect(automation.delivery_mode).toBe('announce');
});
it('leaves operator pack disabled when not selected', async () => {
+10
View File
@@ -116,5 +116,15 @@ describe('ConfigBuilder', () => {
expect((obj.automation as Record<string, unknown>)?.heartbeat).toBeDefined();
expect((obj.automation as Record<string, unknown>)?.daily_briefing).toBeDefined();
expect((obj.automation as Record<string, unknown>)?.minio_sync).toBeDefined();
expect((obj.automation as Record<string, unknown>)?.delivery_mode).toBe('announce');
expect((obj.memory as Record<string, unknown>)?.daily_log).toEqual({
enabled: true,
namespace_prefix: 'daily',
});
expect((obj.memory as Record<string, unknown>)?.proactive_extract).toEqual({
enabled: true,
min_tool_calls: 1,
namespace: 'global',
});
});
});
+15
View File
@@ -257,12 +257,16 @@ export class ConfigBuilder {
applyOperatorPack(options: OperatorPackOptions): void {
const automation = (this.config.automation ?? {}) as Record<string, unknown>;
const backup = (this.config.backup ?? {}) as Record<string, unknown>;
const memory = (this.config.memory ?? {}) as Record<string, unknown>;
backup.enabled = true;
backup.schedule = options.backupSchedule;
backup.run_on_start = true;
backup.notify = { channel: options.outputChannel, peer: options.outputPeer };
// Personal-assistant mode defaults: proactive push and continuity-first memory cadence.
automation.delivery_mode = 'announce';
automation.heartbeat = {
enabled: true,
notify: { channel: options.outputChannel, peer: options.outputPeer },
@@ -298,8 +302,19 @@ export class ConfigBuilder {
};
}
memory.daily_log = {
enabled: true,
namespace_prefix: 'daily',
};
memory.proactive_extract = {
enabled: true,
min_tool_calls: 1,
namespace: 'global',
};
this.config.automation = automation;
this.config.backup = backup;
this.config.memory = memory;
}
build(): SetupConfig {