Долгоживущий агент чата (только для managerIds, тестовый менеджер) и тайминг чата (chat_timing, миграция 016); тесты; docs
All checks were successful
ci / test (push) Successful in 23s
ci / deploy (push) Successful in 1m46s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-16 12:55:18 +03:00
parent 81634fbfa9
commit 65ab75d378
17 changed files with 733 additions and 29 deletions

View File

@@ -67,19 +67,19 @@ describe("режим ответов чата", () => {
it("по умолчанию - только текст, синтез не вызывается", async () => {
const s = setup();
expect(await publishReply(s.deps, manager(), "C", "Hi")).toEqual({ published: true, audioSent: false });
expect(await publishReply(s.deps, manager(), "C", "Hi")).toMatchObject({ published: true, audioSent: false });
expect(s.events).toEqual(["text:Hi"]);
});
it("both - и аудио (голос чата), и текст", async () => {
const s = setup();
expect(await publishReply(s.deps, manager("both", "Puck"), "C", "Hi")).toEqual({ published: true, audioSent: true });
expect(await publishReply(s.deps, manager("both", "Puck"), "C", "Hi")).toMatchObject({ published: true, audioSent: true });
expect(s.events).toEqual(["voice:Puck", "audio:assistant-reply.mp3", "text:Hi"]);
});
it("audio - только аудио, голос по умолчанию из настроек", async () => {
const s = setup();
expect(await publishReply(s.deps, manager("audio"), "C", "Hi")).toEqual({ published: true, audioSent: true });
expect(await publishReply(s.deps, manager("audio"), "C", "Hi")).toMatchObject({ published: true, audioSent: true });
expect(s.events).toEqual(["voice:Aoede", "audio:assistant-reply.mp3"]);
});