feat(runtime): add talk mode and capture tools

This commit is contained in:
William Valentin
2026-02-16 10:17:24 -08:00
parent a9b38150c0
commit 83b8e38b11
12 changed files with 391 additions and 4 deletions
+33
View File
@@ -350,6 +350,39 @@ describe('configSchema — signal', () => {
});
});
describe('configSchema — audio talk mode', () => {
const minimalConfig = {
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
models: { default: { provider: 'anthropic', model: 'claude-3' } },
};
it('defaults talk_mode fields', () => {
const result = configSchema.parse(minimalConfig);
expect(result.audio.talk_mode.enabled).toBe(false);
expect(result.audio.talk_mode.wake_phrase).toBe('hey flynn');
expect(result.audio.talk_mode.timeout_ms).toBe(120000);
expect(result.audio.talk_mode.allow_manual_toggle).toBe(true);
});
it('accepts custom talk_mode settings', () => {
const result = configSchema.parse({
...minimalConfig,
audio: {
talk_mode: {
enabled: true,
wake_phrase: 'ok flynn',
timeout_ms: 300000,
allow_manual_toggle: false,
},
},
});
expect(result.audio.talk_mode.enabled).toBe(true);
expect(result.audio.talk_mode.wake_phrase).toBe('ok flynn');
expect(result.audio.talk_mode.timeout_ms).toBe(300000);
expect(result.audio.talk_mode.allow_manual_toggle).toBe(false);
});
});
describe('configSchema — teams', () => {
const minimalConfig = {
telegram: { bot_token: 'test', allowed_chat_ids: [1] },