feat(skills): enable watcher wiring through daemon lifecycle

This commit is contained in:
William Valentin
2026-02-12 17:18:22 -08:00
parent 95091cc198
commit b773e2bbf3
6 changed files with 171 additions and 9 deletions
+28
View File
@@ -140,6 +140,34 @@ describe('configSchema — per-tier fallback', () => {
});
});
describe('configSchema — skills watcher', () => {
const minimalConfig = {
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
models: { default: { provider: 'anthropic', model: 'claude-3' } },
};
it('defaults skills watcher settings', () => {
const result = configSchema.parse(minimalConfig);
expect(result.skills.load.watch).toBe(false);
expect(result.skills.load.watch_debounce_ms).toBe(250);
});
it('accepts explicit watcher settings', () => {
const result = configSchema.parse({
...minimalConfig,
skills: {
load: {
watch: true,
watch_debounce_ms: 500,
},
},
});
expect(result.skills.load.watch).toBe(true);
expect(result.skills.load.watch_debounce_ms).toBe(500);
});
});
describe('configSchema automation', () => {
const baseConfig = {
telegram: { bot_token: 'test-token', allowed_chat_ids: [123] },