feat(skills): enable watcher wiring through daemon lifecycle
This commit is contained in:
@@ -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] },
|
||||
|
||||
Reference in New Issue
Block a user