Files
khb_microservices/settings_example.json5
Yuri Yaryshev 27b9842894
All checks were successful
ci / test (push) Successful in 14s
ci / deploy (push) Successful in 3m7s
Консольные агенты claude -p вместо рутин: шаги 2-4, Slack Socket Mode, миграция 006, удаление agent_mcp
- khbuild_assistant_prep: agents (cli-runner, сессии, проверка и повторы формата, шаг 2), slack (Socket Mode, приём, шаг 4, Drive/rclone), промты в promts/
- миграция 006: память менеджера, списки дня, журналы проблем/сообщений/запусков; удалены active_task*, ap_agent_invocation
- удалён package agent_mcp; Dockerfile с claude/ffmpeg/exiftool/whisper/rclone; compose-шаблон сервиса агентов
- docs: структура approved/proposed (modules, data_objects, roles), скрипт сводок

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 23:24:23 +03:00

60 lines
4.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Шаблон единого конфига всех сервисов репозитория khb_microservices.
// Скопировать в settings.json5 (он в .gitignore, в git не попадает) и заполнить секреты.
{
common: {
timezone: "America/New_York",
database: { url: "postgres://USER:PASSWORD@HOST:5432/postgres" },
logLevel: "info",
itAlerts: { slackChannelId: "<канал ИТ-команды>", slackBotToken: "<xoxb token>" }, // куда уходят уведомления о сбоях
},
jobtread: { organizationId: "<org id>", grantKey: "<grant key>" },
scheduler: {
tickSeconds: 10, // как часто проверять условия старта заданий
missedGraceSeconds: 60, // позже этого срока задание считается пропущенным (не запускается, только лог)
http: { host: "127.0.0.1", port: 8083, token: "<token>" },
jobs: [
// at - время по common.timezone; days: "daily" | "workdays" (по таблице calendar_day) | ["mon","fri"]
{ name: "collect_before_morning", call: { service: "data_collector", method: "POST", path: "/runs" }, at: "05:50", days: "daily" },
{ name: "prep_morning", call: { service: "khbuild_assistant_prep", method: "POST", path: "/runs", body: { job: "collect_morning" } }, at: "06:00", days: "daily" },
{ name: "collect_before_noon", call: { service: "data_collector", method: "POST", path: "/runs" }, at: "11:40", days: "daily" },
{ name: "prep_noon_recheck", call: { service: "khbuild_assistant_prep", method: "POST", path: "/runs", body: { job: "recheck_noon" } }, at: "11:50", days: "daily" },
{ name: "chat_noon", call: { service: "khbuild_assistant_prep", method: "POST", path: "/chat/event", body: { kind: "noon" } }, at: "12:00", days: "workdays" },
{ name: "chat_followup", call: { service: "khbuild_assistant_prep", method: "POST", path: "/chat/event", body: { kind: "followup" } }, at: "13:00", days: "workdays" },
{ name: "chat_summary", call: { service: "khbuild_assistant_prep", method: "POST", path: "/chat/event", body: { kind: "summary" } }, at: "16:00", days: "workdays" },
{ name: "retention", call: { service: "data_collector", method: "POST", path: "/retention/run" }, at: "03:30", days: "daily" },
],
services: {
data_collector: { baseUrl: "http://127.0.0.1:8084", token: "<token>" },
khbuild_assistant_prep: { baseUrl: "http://127.0.0.1:8085", token: "<token>" },
},
},
data_collector: {
http: { host: "127.0.0.1", port: 8084, token: "<token>" },
sources: ["jobtread"], // источники-зеркала
mirror: { maxSnapshotAgeMinutes: 90 },
retention: {
hourlyKeepHours: 24, dailyKeepDays: 370, dbSizeLimitGb: 30, reducedDaysSteps: [180, 90, 35],
failedKeepDays: 10, failedMaxPerDay: 20,
},
holidays: { country: "US", state: "FL", yearsAhead: 2 }, // импорт в native-таблицу calendar_day (не зеркало)
},
khbuild_assistant_prep: {
http: { host: "127.0.0.1", port: 8085, token: "<token>" },
requiredTables: ["jt_job", "jt_membership", "jt_task", "jt_task_dependency", "jt_task_assignment"], // от каких таблиц зависит; ошибки других таблиц на сервис не влияют
lookaheadWorkDays: 10,
modes: ["test"], // какие project.mode обрабатывать
// консольные агенты claude -p (шаги 2-4 спецификации)
agent: {
concurrency: 3, // одновременно агентов (старт 3-4; сервер 8 GB)
claudeBin: "claude", workRoot: "/data/agents", timeoutMs: 900000, maxFixRetries: 2,
allowedJobIds: ["<id тестового проекта JobTread>"], // куда агенту разрешено писать (MVP - только тестовый проект)
},
slack: { botToken: "<xoxb token>", appToken: "<xapp token, Socket Mode>", channelIds: ["<канал, сообщения которого принимаются>"], debounceSeconds: 8 },
drive: { rcloneBin: "rclone", remote: "gdrive", folder: "builder_assistant" }, // исходники и транскрипты -> Drive
},
}