Режим passive при отключении агента: молчит по своей инициативе, на сообщения менеджера отвечает как обычно (миграция 018); off - вообще ничего; тесты; docs
All checks were successful
ci / test (push) Successful in 24s
ci / deploy (push) Successful in 1m29s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 20:23:15 +03:00
parent 3cbcfb506a
commit c59ac87486
9 changed files with 59 additions and 22 deletions

View File

@@ -2,7 +2,7 @@ import { itNotify, localDate, MirrorNotReadyError, requireFreshTables, type Comm
import { runStep2 } from "./agents/step2.js";
import type { AgentContext } from "./agents/session.js";
import { buildItems, paramsFor } from "./inputs/build.js";
import { NOT_PAUSED_SQL } from "./pause.js";
import { NOT_OFF_SQL } from "./pause.js";
import { writePackage } from "./inputs/package-writer.js";
export type PrepJob = "collect_morning" | "recheck_noon";
@@ -69,7 +69,7 @@ export async function runPrepJob(deps: PrepDeps, job: PrepJob, opts: { projectId
join construction_manager cm on cm.person_id = ap.manager_person_id
join person per on per.id = cm.person_id
where ap.is_enabled and ap.mode = any($1) and cm.is_active and per.is_active and per.jt_membership_id is not null
and ${NOT_PAUSED_SQL("cm")}
and ${NOT_OFF_SQL("cm")}
and ($2::uuid is null or ap.id = $2)
order by ap.created_at`,
[deps.modes, opts.projectId ?? null],