Календарь пассивных окон по дням недели (вторник весь день по Тампе): агенты в режиме passive; API; тесты; docs
All checks were successful
ci / test (push) Successful in 26s
ci / deploy (push) Successful in 1m33s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 21:13:38 +03:00
parent c59ac87486
commit 2a92458106
8 changed files with 166 additions and 4 deletions

View File

@@ -0,0 +1,15 @@
-- Календарь пассивных окон по дням недели: в это время все агенты в режиме passive (сами не пишут, на сообщения отвечают как обычно).
-- Первое окно: встреча менеджеров по вторникам (обсуждают статус работ).
create table agent_passive_window (
id uuid primary key default gen_random_uuid(),
weekday smallint not null check (weekday between 1 and 7), -- ISO: 1 - понедельник ... 7 - воскресенье
from_minute smallint not null default 0 check (from_minute between 0 and 1439), -- минут от полуночи, включительно
to_minute smallint not null default 1440 check (to_minute between 1 and 1440), -- минут от полуночи, не включительно (1440 - до конца дня)
timezone text not null default 'America/New_York',
is_active boolean not null default true,
note text,
created_at timestamptz not null default now(),
check (from_minute < to_minute)
);
alter table agent_passive_window enable row level security;
insert into agent_passive_window (weekday, from_minute, to_minute, note) values (2, 0, 1440, 'встреча менеджеров по вторникам: обсуждают статус работ');