@besales/mcp 0.37.0 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/resources/docs/agent-behavior.md +7 -5
  2. package/dist/resources/docs/platforms.md +5 -1
  3. package/dist/resources/docs/prompt-anatomy.md +4 -4
  4. package/dist/resources/docs/prompt-principles.md +22 -3
  5. package/dist/schemas/mcp-tools.json +1031 -74
  6. package/dist/skills/besales-dialogue-audit/SKILL.md +6 -0
  7. package/dist/tools/definitions/broadcast-analytics.d.ts +7 -0
  8. package/dist/tools/definitions/broadcast-analytics.js +39 -0
  9. package/dist/tools/definitions/broadcast-analytics.js.map +1 -1
  10. package/dist/tools/definitions/broadcast-mailing-variants.d.ts +18 -2
  11. package/dist/tools/definitions/broadcast-mailing-variants.js +66 -3
  12. package/dist/tools/definitions/broadcast-mailing-variants.js.map +1 -1
  13. package/dist/tools/definitions/dialogue-audit.d.ts +23 -0
  14. package/dist/tools/definitions/dialogue-audit.js +155 -0
  15. package/dist/tools/definitions/dialogue-audit.js.map +1 -0
  16. package/dist/tools/definitions/follow-up-setup.d.ts +27 -0
  17. package/dist/tools/definitions/follow-up-setup.js +76 -0
  18. package/dist/tools/definitions/follow-up-setup.js.map +1 -0
  19. package/dist/tools/definitions/follow-up.d.ts +19 -0
  20. package/dist/tools/definitions/follow-up.js +85 -3
  21. package/dist/tools/definitions/follow-up.js.map +1 -1
  22. package/dist/tools/definitions/getcourse-cold-welcome.d.ts +56 -0
  23. package/dist/tools/definitions/getcourse-cold-welcome.js +241 -0
  24. package/dist/tools/definitions/getcourse-cold-welcome.js.map +1 -0
  25. package/dist/tools/definitions/platform-setup.d.ts +24 -16
  26. package/dist/tools/definitions/platform-setup.js +27 -34
  27. package/dist/tools/definitions/platform-setup.js.map +1 -1
  28. package/dist/tools/definitions/scheduled-tasks.d.ts +5 -0
  29. package/dist/tools/definitions/scheduled-tasks.js +35 -0
  30. package/dist/tools/definitions/scheduled-tasks.js.map +1 -1
  31. package/dist/tools/definitions/shared.d.ts +23 -13
  32. package/dist/tools/definitions/shared.js +60 -7
  33. package/dist/tools/definitions/shared.js.map +1 -1
  34. package/dist/tools/definitions.d.ts +123 -18
  35. package/dist/tools/definitions.js +6 -1
  36. package/dist/tools/definitions.js.map +1 -1
  37. package/dist/tools/registry-mapping-cases-core.d.ts +4 -0
  38. package/dist/tools/registry-mapping-cases-core.js.map +1 -1
  39. package/dist/tools/registry-mapping-cases-platform.js +45 -1
  40. package/dist/tools/registry-mapping-cases-platform.js.map +1 -1
  41. package/package.json +2 -2
@@ -2849,7 +2849,7 @@
2849
2849
  },
2850
2850
  {
2851
2851
  "name": "besales_routing_rule_upsert",
2852
- "description": "Create or patch one router routing rule. Does not bulk replace the router. Direct agent routing requires explicit_confirmation. For CUSTOM_VARIABLE pass either conditions[] (N conditions joined by condition_logic ALL=AND / ANY=OR) or the legacy custom_variable_id+variable_value pair (single condition).",
2852
+ "description": "Create or patch one router routing rule. Does not bulk replace the router. Direct agent routing requires explicit_confirmation. For CUSTOM_VARIABLE pass either conditions[] (N conditions joined by condition_logic ALL=AND / ANY=OR) or the legacy custom_variable_id+variable_value pair (single condition). Each condition holds a SET of values in variable_values[]: the condition matches when the contact variable equals ANY of them (OR inside the condition). Combined with condition_logic=ALL this expresses AND-of-ORs without nested parentheses, e.g. AI_TOPIC in [dbo] AND WAVE_SEGMENT in [post-web, post-web-2] — use ONE rule with two conditions, not two rules. Legacy single-value form variable_value is still accepted per condition. Editing an existing rule that has multi-value conditions requires conditions[]; the legacy scalar does not replace them and returns 409.",
2853
2853
  "inputSchema": {
2854
2854
  "type": "object",
2855
2855
  "required": [
@@ -2905,14 +2905,21 @@
2905
2905
  "items": {
2906
2906
  "type": "object",
2907
2907
  "required": [
2908
- "custom_variable_id",
2909
- "variable_value"
2908
+ "custom_variable_id"
2910
2909
  ],
2911
2910
  "properties": {
2912
2911
  "custom_variable_id": {
2913
2912
  "type": "string",
2914
2913
  "format": "uuid"
2915
2914
  },
2915
+ "variable_values": {
2916
+ "type": "array",
2917
+ "minItems": 1,
2918
+ "maxItems": 50,
2919
+ "items": {
2920
+ "type": "string"
2921
+ }
2922
+ },
2916
2923
  "variable_value": {
2917
2924
  "type": "string"
2918
2925
  }
@@ -3016,6 +3023,14 @@
3016
3023
  },
3017
3024
  "confirmation_reason": {
3018
3025
  "type": "string"
3026
+ },
3027
+ "allow_repeated_calls": {
3028
+ "type": "boolean",
3029
+ "description": "Повтор ВНУТРИ одного ответа модели."
3030
+ },
3031
+ "run_once_per_contact": {
3032
+ "type": "boolean",
3033
+ "description": "Одно срабатывание на контакт НАВСЕГДА. Другая ось, чем allow_repeated_calls."
3019
3034
  }
3020
3035
  }
3021
3036
  }
@@ -3046,7 +3061,8 @@
3046
3061
  "format": "uuid"
3047
3062
  },
3048
3063
  "explicit_confirmation": {
3049
- "const": true
3064
+ "const": true,
3065
+ "type": "boolean"
3050
3066
  },
3051
3067
  "confirmation_reason": {
3052
3068
  "type": "string"
@@ -3123,7 +3139,7 @@
3123
3139
  },
3124
3140
  "media_handling": {
3125
3141
  "type": "object",
3126
- "description": "Стратегии обработки image/video/audio/document.",
3142
+ "description": "Стратегии обработки image/video/audio/document. PROCESS_WITH_LLM разбирает вложение по-разному: image → vision-модель, video → подпись как текст, document → извлечённый текст файла (PDF/DOCX/DOC/XLSX/XLS/CSV/TXT; скан без текстового слоя и неподдерживаемый формат уводят на оператора). Для audio его нет вовсе — там только SILENT и FIXED_RESPONSE, иначе бэкенд отвечает 400.",
3127
3143
  "properties": {
3128
3144
  "image": {
3129
3145
  "$ref": "#/$defs/mediaHandler"
@@ -3132,7 +3148,7 @@
3132
3148
  "$ref": "#/$defs/mediaHandler"
3133
3149
  },
3134
3150
  "audio": {
3135
- "$ref": "#/$defs/mediaHandler"
3151
+ "$ref": "#/$defs/plainMediaHandler"
3136
3152
  },
3137
3153
  "document": {
3138
3154
  "$ref": "#/$defs/mediaHandler"
@@ -3207,6 +3223,7 @@
3207
3223
  "bot_waiting_return_hours": {
3208
3224
  "type": "integer",
3209
3225
  "enum": [
3226
+ -1,
3210
3227
  0,
3211
3228
  1,
3212
3229
  3,
@@ -3343,6 +3360,7 @@
3343
3360
  "$defs": {
3344
3361
  "mediaHandler": {
3345
3362
  "type": "object",
3363
+ "description": "Обработчик вложения, поддерживающего разбор моделью (image, video, document).",
3346
3364
  "required": [
3347
3365
  "behavior"
3348
3366
  ],
@@ -3365,6 +3383,31 @@
3365
3383
  "type": "string"
3366
3384
  }
3367
3385
  }
3386
+ },
3387
+ "plainMediaHandler": {
3388
+ "type": "object",
3389
+ "description": "Обработчик вложения без разбора моделью (audio): у AudioHandlingBehavior нет значения PROCESS_WITH_LLM.",
3390
+ "required": [
3391
+ "behavior"
3392
+ ],
3393
+ "properties": {
3394
+ "behavior": {
3395
+ "type": "string",
3396
+ "enum": [
3397
+ "SILENT",
3398
+ "FIXED_RESPONSE"
3399
+ ]
3400
+ },
3401
+ "fixed_response_text": {
3402
+ "type": "string"
3403
+ },
3404
+ "call_operator": {
3405
+ "type": "boolean"
3406
+ },
3407
+ "operator_comment": {
3408
+ "type": "string"
3409
+ }
3410
+ }
3368
3411
  }
3369
3412
  }
3370
3413
  }
@@ -3435,7 +3478,7 @@
3435
3478
  "eventType",
3436
3479
  "variable"
3437
3480
  ],
3438
- "description": "Режим отбора контактов. Неизвестное значение НЕ включает ни один фильтр — цепочка ушла бы всем контактам канала, поэтому бэкенд его отвергает."
3481
+ "description": "БАЗОВЫЙ отбор: по статусу CRM, по типу события платформы либо variable = базового фильтра нет (отбор только по sequenceConditions). Условия по переменным ортогональны и добавляются через И: чтобы ветвить цепочки по варианту рассылки, сохранив отбор по событию, бери eventType и задай sequenceConditions, а НЕ variable. Неизвестное значение НЕ включает ни один фильтр — цепочка ушла бы всем контактам канала, поэтому бэкенд его отвергает."
3439
3482
  },
3440
3483
  "sequenceConditions": {
3441
3484
  "type": "array",
@@ -3475,7 +3518,7 @@
3475
3518
  }
3476
3519
  }
3477
3520
  },
3478
- "description": "Обязателен и непуст при filterMode=variable."
3521
+ "description": "Условия принадлежности контакта цепочке, соединяются через И. Применяются при ЛЮБОМ filterMode (при variable обязателен и непуст, иначе цепочка не выберет никого). Ветвление по измерениям рассылки GetCourse: WAVE_MAILING_VARIANT — UUID варианта из каталога воркспейса, а НЕ его имя (first-ver будет отвергнут); WAVE_PRODUCT — код продукта строчными без пробелов (dbo); WAVE_FUNNEL — КЛЮЧ воронки (f-код f11, иначе вся строка строчными), а НЕ метка запуска (f11 — ВК NR ДБО будет отвергнут); WAVE_SEGMENT — имя сегмента. Значения проставляет запуск рассылки, у контакта без рассылки их нет. Отдельные цепочки НЕ взаимоисключающи: прогресс изолирован по sequenceId, поэтому безусловная ловящая цепочка рядом с eq A и eq B не подстрахует, а удвоит отправку. Набор обязан быть строгим разбиением: eq A, eq B и fallback neq A AND neq B (у контакта без переменной eq/in ложно, neq истинно)."
3479
3522
  },
3480
3523
  "steps": {
3481
3524
  "type": "array",
@@ -3595,6 +3638,33 @@
3595
3638
  }
3596
3639
  }
3597
3640
  },
3641
+ {
3642
+ "name": "besales_followup_sequence_clone",
3643
+ "description": "Скопировать follow-up sequence на ТОЙ ЖЕ платформе. Копия всегда создаётся ВЫКЛЮЧЕННОЙ: прогресс изолирован по sequenceId, и включённая копия слала бы те же касания тем же контактам вторым потоком. Копируется только определение (имя, тип, триггер, config) — прогресс контактов, история отправок и запланированные сообщения не копируются. Имя не передано — сервер подберёт свободное (<имя>-copy, <имя>-copy-2, …). Cross-platform не поддерживается: конфиг ссылается на статусы CRM, агентов, файлы и переменные своей платформы.",
3644
+ "inputSchema": {
3645
+ "type": "object",
3646
+ "required": [
3647
+ "platform_id",
3648
+ "sequence_id"
3649
+ ],
3650
+ "properties": {
3651
+ "platform_id": {
3652
+ "type": "string",
3653
+ "format": "uuid",
3654
+ "description": "Платформа источника; копия приземляется на неё же."
3655
+ },
3656
+ "sequence_id": {
3657
+ "type": "string",
3658
+ "format": "uuid",
3659
+ "description": "Исходный FollowUpSequence для копирования."
3660
+ },
3661
+ "name": {
3662
+ "type": "string",
3663
+ "description": "Имя копии. Не передано — сервер подберёт свободное от имени источника; передано и занято — тот же подбор применится к нему."
3664
+ }
3665
+ }
3666
+ }
3667
+ },
3598
3668
  {
3599
3669
  "name": "besales_pipeline_settings_update",
3600
3670
  "description": "Patch allowlisted platform PipelineSettings via typed sections (crm_pipeline_behavior, auto_finish). Phase B (2026-05-27): generic `updates` field удалён — отвергается с 400. CRM stage movement or lead/contact creation fields require explicit_confirmation.",
@@ -3698,7 +3768,8 @@
3698
3768
  "type": "object",
3699
3769
  "properties": {
3700
3770
  "is_active": {
3701
- "type": "boolean"
3771
+ "type": "boolean",
3772
+ "description": "У Instagram это НАМЕРЕНИЕ держать канал включённым, а не факт работы. Эффективная активность = намерение И подтверждённая подписка на вебхуки, поэтому besales_platform_context_get может вернуть is_active=false сразу после успешного сохранения is_active=true — это не отказ операции, а неподтверждённая подписка (лечится повтором подписки в настройках канала). У остальных 12 каналов значение совпадает с фактом работы."
3702
3773
  },
3703
3774
  "is_ai_enabled": {
3704
3775
  "type": "boolean"
@@ -3887,7 +3958,8 @@
3887
3958
  "type": "string"
3888
3959
  },
3889
3960
  "is_active": {
3890
- "type": "boolean"
3961
+ "type": "boolean",
3962
+ "description": "У Instagram это НАМЕРЕНИЕ держать канал включённым, а не факт работы. Эффективная активность = намерение И подтверждённая подписка на вебхуки, поэтому besales_platform_context_get может вернуть is_active=false сразу после успешного сохранения is_active=true — это не отказ операции, а неподтверждённая подписка (лечится повтором подписки в настройках канала). У остальных 12 каналов значение совпадает с фактом работы."
3891
3963
  }
3892
3964
  }
3893
3965
  },
@@ -4257,6 +4329,13 @@
4257
4329
  "null"
4258
4330
  ],
4259
4331
  "description": "OPTIONAL GetCourse stage id inside the funnel above. Must be set together with create_missing_deal_funnel_id."
4332
+ },
4333
+ "revenue_offer_ids": {
4334
+ "type": "array",
4335
+ "items": {
4336
+ "type": "integer"
4337
+ },
4338
+ "description": "GetCourse offer ids whose paid orders are credited to us regardless of who created the order — the agent via GETCOURSE_CREATE_DEAL or a manager by hand in the GetCourse admin. Empty array turns the rule off. The set applies to the whole school (every platform sharing the GetCourse domain), not to a single platform. Changes money attribution retroactively — dangerous, requires explicit_confirmation."
4260
4339
  }
4261
4340
  }
4262
4341
  },
@@ -6298,7 +6377,8 @@
6298
6377
  "description": "Required when scope=CHANNEL"
6299
6378
  },
6300
6379
  "explicit_confirmation": {
6301
- "const": true
6380
+ "const": true,
6381
+ "type": "boolean"
6302
6382
  }
6303
6383
  }
6304
6384
  }
@@ -6393,7 +6473,8 @@
6393
6473
  "description": "Required для GetCourse (manual funnel_id); ignored для AmoCRM/Bitrix24"
6394
6474
  },
6395
6475
  "acknowledge_external_side_effect": {
6396
- "const": true
6476
+ "const": true,
6477
+ "type": "boolean"
6397
6478
  }
6398
6479
  }
6399
6480
  }
@@ -6437,7 +6518,8 @@
6437
6518
  "type": "boolean"
6438
6519
  },
6439
6520
  "acknowledge_external_side_effect": {
6440
- "const": true
6521
+ "const": true,
6522
+ "type": "boolean"
6441
6523
  }
6442
6524
  }
6443
6525
  }
@@ -6467,10 +6549,12 @@
6467
6549
  "type": "integer"
6468
6550
  },
6469
6551
  "explicit_confirmation": {
6470
- "const": true
6552
+ "const": true,
6553
+ "type": "boolean"
6471
6554
  },
6472
6555
  "acknowledge_external_side_effect": {
6473
- "const": true
6556
+ "const": true,
6557
+ "type": "boolean"
6474
6558
  }
6475
6559
  }
6476
6560
  }
@@ -6560,7 +6644,8 @@
6560
6644
  "description": "Required для GetCourse (manual funnel_stage_id)"
6561
6645
  },
6562
6646
  "acknowledge_external_side_effect": {
6563
- "const": true
6647
+ "const": true,
6648
+ "type": "boolean"
6564
6649
  }
6565
6650
  }
6566
6651
  }
@@ -6627,7 +6712,8 @@
6627
6712
  ]
6628
6713
  },
6629
6714
  "acknowledge_external_side_effect": {
6630
- "const": true
6715
+ "const": true,
6716
+ "type": "boolean"
6631
6717
  }
6632
6718
  }
6633
6719
  }
@@ -6661,10 +6747,12 @@
6661
6747
  "type": "integer"
6662
6748
  },
6663
6749
  "explicit_confirmation": {
6664
- "const": true
6750
+ "const": true,
6751
+ "type": "boolean"
6665
6752
  },
6666
6753
  "acknowledge_external_side_effect": {
6667
- "const": true
6754
+ "const": true,
6755
+ "type": "boolean"
6668
6756
  }
6669
6757
  }
6670
6758
  }
@@ -6728,7 +6816,8 @@
6728
6816
  "format": "uuid"
6729
6817
  },
6730
6818
  "explicit_confirmation": {
6731
- "const": true
6819
+ "const": true,
6820
+ "type": "boolean"
6732
6821
  }
6733
6822
  }
6734
6823
  }
@@ -6838,10 +6927,12 @@
6838
6927
  "format": "uuid"
6839
6928
  },
6840
6929
  "explicit_confirmation": {
6841
- "const": true
6930
+ "const": true,
6931
+ "type": "boolean"
6842
6932
  },
6843
6933
  "acknowledge_destructive_overwrite": {
6844
- "const": true
6934
+ "const": true,
6935
+ "type": "boolean"
6845
6936
  },
6846
6937
  "idempotency_key": {
6847
6938
  "type": "string",
@@ -7237,7 +7328,8 @@
7237
7328
  "format": "uuid"
7238
7329
  },
7239
7330
  "replace_all_existing": {
7240
- "const": true
7331
+ "const": true,
7332
+ "type": "boolean"
7241
7333
  },
7242
7334
  "enabled": {
7243
7335
  "type": "boolean"
@@ -8121,6 +8213,30 @@
8121
8213
  ],
8122
8214
  "description": "Один или несколько ID именованных вариантов рассылки."
8123
8215
  },
8216
+ "mechanism": {
8217
+ "oneOf": [
8218
+ {
8219
+ "type": "string",
8220
+ "enum": [
8221
+ "wave",
8222
+ "cold_welcome"
8223
+ ]
8224
+ },
8225
+ {
8226
+ "type": "array",
8227
+ "minItems": 1,
8228
+ "maxItems": 2,
8229
+ "items": {
8230
+ "type": "string",
8231
+ "enum": [
8232
+ "wave",
8233
+ "cold_welcome"
8234
+ ]
8235
+ }
8236
+ }
8237
+ ],
8238
+ "description": "Механизм запуска: wave — доставляет процесс школы (мы штампуем поля сделки), cold_welcome — пишем первыми сами. Оба значения = фильтра нет."
8239
+ },
8124
8240
  "product": {
8125
8241
  "oneOf": [
8126
8242
  {
@@ -8437,6 +8553,30 @@
8437
8553
  }
8438
8554
  ]
8439
8555
  },
8556
+ "mechanism": {
8557
+ "oneOf": [
8558
+ {
8559
+ "type": "string",
8560
+ "enum": [
8561
+ "wave",
8562
+ "cold_welcome"
8563
+ ]
8564
+ },
8565
+ {
8566
+ "type": "array",
8567
+ "minItems": 1,
8568
+ "maxItems": 2,
8569
+ "items": {
8570
+ "type": "string",
8571
+ "enum": [
8572
+ "wave",
8573
+ "cold_welcome"
8574
+ ]
8575
+ }
8576
+ }
8577
+ ],
8578
+ "description": "Механизм запуска: wave — доставляет процесс школы (мы штампуем поля сделки), cold_welcome — пишем первыми сами. Оба значения = фильтра нет."
8579
+ },
8440
8580
  "product": {
8441
8581
  "oneOf": [
8442
8582
  {
@@ -8597,6 +8737,77 @@
8597
8737
  }
8598
8738
  }
8599
8739
  },
8740
+ {
8741
+ "name": "besales_followup_reactions",
8742
+ "description": "Read-only аналитика дожимов: на какой шаг follow-up-цепочки контакт реально отреагировал. Метрик ДВЕ — операционная (следует за длиной окна шага, шаги по ней сравнивать нельзя) и сравнительная на равном горизонте (сравнивать можно только при comparableReliable=true). Срезы по сегменту/продукту/мессенджеру доступны только у каналов с рассылками. Scope: read:analytics.",
8743
+ "inputSchema": {
8744
+ "type": "object",
8745
+ "required": [
8746
+ "platform_id",
8747
+ "from",
8748
+ "to"
8749
+ ],
8750
+ "additionalProperties": false,
8751
+ "properties": {
8752
+ "platform_id": {
8753
+ "type": "string",
8754
+ "format": "uuid"
8755
+ },
8756
+ "from": {
8757
+ "type": "string",
8758
+ "format": "date",
8759
+ "description": "Начало периода по дате отправки шага (YYYY-MM-DD, московские сутки)."
8760
+ },
8761
+ "to": {
8762
+ "type": "string",
8763
+ "format": "date",
8764
+ "description": "Конец периода. Период длиннее 366 суток отвергается с 400."
8765
+ },
8766
+ "sequence_id": {
8767
+ "type": "array",
8768
+ "items": {
8769
+ "type": "string",
8770
+ "format": "uuid"
8771
+ },
8772
+ "description": "Фильтр цепочек. НЕ влияет на атрибуцию: окно ответа считается по полной шкале касаний."
8773
+ },
8774
+ "horizon_minutes": {
8775
+ "type": "integer",
8776
+ "enum": [
8777
+ 30,
8778
+ 60,
8779
+ 90,
8780
+ 180,
8781
+ 360,
8782
+ 720,
8783
+ 1440
8784
+ ],
8785
+ "description": "Горизонт сравнительной метрики, минуты. По умолчанию 90."
8786
+ },
8787
+ "segment": {
8788
+ "type": "array",
8789
+ "items": {
8790
+ "type": "string"
8791
+ },
8792
+ "description": "Сегменты волны; доступные значения приходят в ответе (dimensions.segments)."
8793
+ },
8794
+ "product": {
8795
+ "type": "array",
8796
+ "items": {
8797
+ "type": "string"
8798
+ },
8799
+ "description": "Продукты волны (dimensions.products)."
8800
+ },
8801
+ "channel": {
8802
+ "type": "array",
8803
+ "items": {
8804
+ "type": "string"
8805
+ },
8806
+ "description": "Транспорты волны (dimensions.channels): Telegram, WhatsApp, MAX, VK."
8807
+ }
8808
+ }
8809
+ }
8810
+ },
8600
8811
  {
8601
8812
  "name": "besales_scheduled_task_list",
8602
8813
  "description": "Read-only список плановых задач канала (модуль «Задачи»). Единственный тип — DIALOGUE_ANALYSIS (суфлёр: саммари дня + почасовой «Статус коммуникации»). Scope: mcp:platform-setup.",
@@ -8773,6 +8984,39 @@
8773
8984
  },
8774
8985
  "description": "ASSIGNED_BY_ID ответственных Bitrix (не наши id — бери из besales_crm_operator_list). Разбираются ТОЛЬКО перечисленные. Пусто = не выбрано (включённая задача вернёт 400), а НЕ «все»."
8775
8986
  },
8987
+ "stages": {
8988
+ "type": [
8989
+ "array",
8990
+ "null"
8991
+ ],
8992
+ "items": {
8993
+ "type": "object",
8994
+ "additionalProperties": false,
8995
+ "required": [
8996
+ "pipeline_crm_id",
8997
+ "pipeline_id",
8998
+ "status_id"
8999
+ ],
9000
+ "properties": {
9001
+ "pipeline_crm_id": {
9002
+ "type": "string",
9003
+ "format": "uuid",
9004
+ "description": "UUID CRM-интеграции."
9005
+ },
9006
+ "pipeline_id": {
9007
+ "type": "integer",
9008
+ "minimum": 0,
9009
+ "description": "Числовой id воронки CRM."
9010
+ },
9011
+ "status_id": {
9012
+ "type": "integer",
9013
+ "minimum": 0,
9014
+ "description": "Номер колонки внутри воронки."
9015
+ }
9016
+ }
9017
+ },
9018
+ "description": "Колонки ВНУТРИ выбранных воронок, общие для обоих режимов. Семантика пустоты ОБРАТНАЯ воронкам: ключа нет или null — все колонки выбранных воронок, воронка без выбранных колонок идёт целиком. ПУСТОЙ массив у включённой задачи вернёт 400. Стадия — тройка: номер колонки уникален лишь внутри пары (CRM, воронка)."
9019
+ },
8776
9020
  "daily_prompt": {
8777
9021
  "type": [
8778
9022
  "string",
@@ -8839,74 +9083,577 @@
8839
9083
  "description": {
8840
9084
  "type": "string",
8841
9085
  "maxLength": 4000
8842
- }
8843
- }
8844
- }
8845
- },
8846
- {
8847
- "name": "besales_broadcast_mailing_variant_update",
8848
- "description": "Изменить название, описание или архивный статус «Варианта рассылки».",
8849
- "inputSchema": {
8850
- "type": "object",
8851
- "required": [
8852
- "mailing_variant_id"
8853
- ],
8854
- "additionalProperties": false,
8855
- "properties": {
8856
- "workspace_id": {
8857
- "type": "string",
8858
- "format": "uuid",
8859
- "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
8860
9086
  },
8861
- "mailing_variant_id": {
8862
- "type": "string",
8863
- "format": "uuid"
9087
+ "message_text": {
9088
+ "type": [
9089
+ "string",
9090
+ "null"
9091
+ ],
9092
+ "maxLength": 4000,
9093
+ "description": "Текст рассылки для механизма «Первое сообщение»: {firstName}, переменные платформы/воркспейса и {{link:slug}} позволены. null = очистить."
8864
9094
  },
8865
- "name": {
8866
- "type": "string",
8867
- "minLength": 1,
8868
- "maxLength": 200
9095
+ "message_text_by_segment": {
9096
+ "type": [
9097
+ "object",
9098
+ "null"
9099
+ ],
9100
+ "description": "Тексты по сегментам: ключ — имя сегмента из справочника воркспейса, значение — текст для него. Запуск с меткой такого сегмента отправит его текст вместо message_text. Работает только при аудитории по файлу: когорта по дате сегментом не отбирается. null или {} — убрать посегментные тексты.",
9101
+ "propertyNames": {
9102
+ "type": "string",
9103
+ "minLength": 1,
9104
+ "maxLength": 200
9105
+ },
9106
+ "additionalProperties": {
9107
+ "type": "string",
9108
+ "minLength": 1,
9109
+ "maxLength": 4000
9110
+ },
9111
+ "maxProperties": 50
8869
9112
  },
8870
- "description": {
9113
+ "default_segment": {
8871
9114
  "type": [
8872
9115
  "string",
8873
9116
  "null"
8874
9117
  ],
8875
- "maxLength": 4000
9118
+ "maxLength": 200,
9119
+ "description": "Метка аналитики по умолчанию; аудиторию НЕ фильтрует."
8876
9120
  },
8877
- "archived": {
8878
- "type": "boolean"
9121
+ "default_product_code": {
9122
+ "type": [
9123
+ "string",
9124
+ "null"
9125
+ ],
9126
+ "maxLength": 200,
9127
+ "description": "Метка аналитики по умолчанию."
8879
9128
  },
8880
- "explicit_confirmation": {
8881
- "type": "boolean",
8882
- "const": true,
8883
- "description": "Обязательно true при archived=true после явного подтверждения пользователя."
8884
- }
8885
- },
8886
- "if": {
9129
+ "default_funnel": {
9130
+ "type": [
9131
+ "string",
9132
+ "null"
9133
+ ],
9134
+ "maxLength": 200,
9135
+ "description": "Метка аналитики по умолчанию."
9136
+ },
9137
+ "default_channels": {
9138
+ "type": "array",
9139
+ "items": {
9140
+ "type": "string",
9141
+ "enum": [
9142
+ "Site",
9143
+ "Email",
9144
+ "SMS",
9145
+ "Telegram",
9146
+ "Facebook",
9147
+ "VK",
9148
+ "Chatium",
9149
+ "WhatsApp",
9150
+ "Viber",
9151
+ "MAX"
9152
+ ]
9153
+ },
9154
+ "description": "Каналы Шага 2 волны по файлу по умолчанию; подставляются в запуск волны."
9155
+ },
9156
+ "default_deal_fields": {
9157
+ "type": [
9158
+ "object",
9159
+ "null"
9160
+ ],
9161
+ "additionalProperties": {
9162
+ "type": [
9163
+ "string",
9164
+ "number",
9165
+ "boolean",
9166
+ "null"
9167
+ ]
9168
+ },
9169
+ "description": "Поля сделки Шага 2 по умолчанию: ключ — числовой fieldId GetCourse. null = очистить.",
9170
+ "propertyNames": {
9171
+ "pattern": "^\\d+$"
9172
+ }
9173
+ },
9174
+ "default_platform_id": {
9175
+ "type": [
9176
+ "string",
9177
+ "null"
9178
+ ],
9179
+ "format": "uuid",
9180
+ "description": "Платформа запуска по умолчанию; подставляется, если на запуске не передана."
9181
+ }
9182
+ }
9183
+ }
9184
+ },
9185
+ {
9186
+ "name": "besales_broadcast_mailing_variant_update",
9187
+ "description": "Изменить название, описание или архивный статус «Варианта рассылки». Теперь вариант несёт и ТЕКСТ рассылки с дефолтами запуска.",
9188
+ "inputSchema": {
9189
+ "type": "object",
9190
+ "required": [
9191
+ "mailing_variant_id"
9192
+ ],
9193
+ "additionalProperties": false,
9194
+ "properties": {
9195
+ "workspace_id": {
9196
+ "type": "string",
9197
+ "format": "uuid",
9198
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
9199
+ },
9200
+ "mailing_variant_id": {
9201
+ "type": "string",
9202
+ "format": "uuid"
9203
+ },
9204
+ "name": {
9205
+ "type": "string",
9206
+ "minLength": 1,
9207
+ "maxLength": 200
9208
+ },
9209
+ "description": {
9210
+ "type": [
9211
+ "string",
9212
+ "null"
9213
+ ],
9214
+ "maxLength": 4000
9215
+ },
9216
+ "archived": {
9217
+ "type": "boolean"
9218
+ },
9219
+ "explicit_confirmation": {
9220
+ "type": "boolean",
9221
+ "const": true,
9222
+ "description": "Обязательно true при archived=true после явного подтверждения пользователя."
9223
+ },
9224
+ "message_text": {
9225
+ "type": [
9226
+ "string",
9227
+ "null"
9228
+ ],
9229
+ "maxLength": 4000,
9230
+ "description": "Текст рассылки для механизма «Первое сообщение»: {firstName}, переменные платформы/воркспейса и {{link:slug}} позволены. null = очистить."
9231
+ },
9232
+ "message_text_by_segment": {
9233
+ "type": [
9234
+ "object",
9235
+ "null"
9236
+ ],
9237
+ "description": "Тексты по сегментам: ключ — имя сегмента из справочника воркспейса, значение — текст для него. Запуск с меткой такого сегмента отправит его текст вместо message_text. Работает только при аудитории по файлу: когорта по дате сегментом не отбирается. null или {} — убрать посегментные тексты.",
9238
+ "propertyNames": {
9239
+ "type": "string",
9240
+ "minLength": 1,
9241
+ "maxLength": 200
9242
+ },
9243
+ "additionalProperties": {
9244
+ "type": "string",
9245
+ "minLength": 1,
9246
+ "maxLength": 4000
9247
+ },
9248
+ "maxProperties": 50
9249
+ },
9250
+ "default_segment": {
9251
+ "type": [
9252
+ "string",
9253
+ "null"
9254
+ ],
9255
+ "maxLength": 200,
9256
+ "description": "Метка аналитики по умолчанию; аудиторию НЕ фильтрует."
9257
+ },
9258
+ "default_product_code": {
9259
+ "type": [
9260
+ "string",
9261
+ "null"
9262
+ ],
9263
+ "maxLength": 200,
9264
+ "description": "Метка аналитики по умолчанию."
9265
+ },
9266
+ "default_funnel": {
9267
+ "type": [
9268
+ "string",
9269
+ "null"
9270
+ ],
9271
+ "maxLength": 200,
9272
+ "description": "Метка аналитики по умолчанию."
9273
+ },
9274
+ "default_channels": {
9275
+ "type": "array",
9276
+ "items": {
9277
+ "type": "string",
9278
+ "enum": [
9279
+ "Site",
9280
+ "Email",
9281
+ "SMS",
9282
+ "Telegram",
9283
+ "Facebook",
9284
+ "VK",
9285
+ "Chatium",
9286
+ "WhatsApp",
9287
+ "Viber",
9288
+ "MAX"
9289
+ ]
9290
+ },
9291
+ "description": "Каналы Шага 2 волны по файлу по умолчанию; подставляются в запуск волны."
9292
+ },
9293
+ "default_deal_fields": {
9294
+ "type": [
9295
+ "object",
9296
+ "null"
9297
+ ],
9298
+ "additionalProperties": {
9299
+ "type": [
9300
+ "string",
9301
+ "number",
9302
+ "boolean",
9303
+ "null"
9304
+ ]
9305
+ },
9306
+ "description": "Поля сделки Шага 2 по умолчанию: ключ — числовой fieldId GetCourse. null = очистить.",
9307
+ "propertyNames": {
9308
+ "pattern": "^\\d+$"
9309
+ }
9310
+ },
9311
+ "default_platform_id": {
9312
+ "type": [
9313
+ "string",
9314
+ "null"
9315
+ ],
9316
+ "format": "uuid",
9317
+ "description": "Платформа запуска по умолчанию; подставляется, если на запуске не передана."
9318
+ }
9319
+ },
9320
+ "if": {
8887
9321
  "properties": {
8888
9322
  "archived": {
8889
9323
  "const": true
8890
9324
  }
8891
9325
  },
8892
- "required": [
8893
- "archived"
8894
- ]
8895
- },
8896
- "then": {
8897
- "required": [
8898
- "explicit_confirmation"
8899
- ]
9326
+ "required": [
9327
+ "archived"
9328
+ ]
9329
+ },
9330
+ "then": {
9331
+ "required": [
9332
+ "explicit_confirmation"
9333
+ ]
9334
+ }
9335
+ }
9336
+ },
9337
+ {
9338
+ "name": "besales_broadcast_mailing_variant_delete",
9339
+ "description": "Архивировать «Вариант рассылки», сохранив историческую аналитику и ссылки отложенных durable-run.",
9340
+ "inputSchema": {
9341
+ "type": "object",
9342
+ "required": [
9343
+ "mailing_variant_id",
9344
+ "explicit_confirmation"
9345
+ ],
9346
+ "additionalProperties": false,
9347
+ "properties": {
9348
+ "workspace_id": {
9349
+ "type": "string",
9350
+ "format": "uuid",
9351
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
9352
+ },
9353
+ "mailing_variant_id": {
9354
+ "type": "string",
9355
+ "format": "uuid"
9356
+ },
9357
+ "explicit_confirmation": {
9358
+ "type": "boolean",
9359
+ "const": true,
9360
+ "description": "Обязательно true после явного подтверждения пользователя."
9361
+ }
9362
+ }
9363
+ }
9364
+ },
9365
+ {
9366
+ "name": "besales_getcourse_cold_welcome_preview",
9367
+ "description": "Охват рассылки «Первое сообщение» БЕЗ отправки: totalContacts (ещё могут получить), alreadyWelcomed (уже получали — первое сообщение одноразово на контакт), foundContacts.",
9368
+ "inputSchema": {
9369
+ "type": "object",
9370
+ "required": [
9371
+ "platform_id"
9372
+ ],
9373
+ "additionalProperties": false,
9374
+ "properties": {
9375
+ "workspace_id": {
9376
+ "type": "string",
9377
+ "format": "uuid",
9378
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
9379
+ },
9380
+ "platform_id": {
9381
+ "type": "string",
9382
+ "format": "uuid"
9383
+ },
9384
+ "created_after": {
9385
+ "type": "string",
9386
+ "format": "date-time",
9387
+ "description": "Аудитория «по дате»: нижняя граница по дате создания контакта. Ровно одна аудитория — created_after ЛИБО contacts."
9388
+ },
9389
+ "contacts": {
9390
+ "type": "array",
9391
+ "minItems": 1,
9392
+ "maxItems": 5000,
9393
+ "description": "Аудитория «по файлу»: контакты предсписка. Ровно одна аудитория на запуск — created_after ЛИБО contacts.",
9394
+ "items": {
9395
+ "type": "object",
9396
+ "required": [
9397
+ "contact_id"
9398
+ ],
9399
+ "additionalProperties": false,
9400
+ "properties": {
9401
+ "contact_id": {
9402
+ "type": "string",
9403
+ "pattern": "^\\d+$",
9404
+ "description": "getcourseUserId контакта (число в строковом виде)"
9405
+ },
9406
+ "deal_id": {
9407
+ "type": "string",
9408
+ "pattern": "^\\d+$",
9409
+ "description": "Пин сделки для штампа полей (число в строковом виде)"
9410
+ }
9411
+ }
9412
+ }
9413
+ }
9414
+ }
9415
+ }
9416
+ },
9417
+ {
9418
+ "name": "besales_getcourse_cold_welcome_start",
9419
+ "description": "Запустить рассылку «Первое сообщение» (мы пишем первыми контактам без диалога). НЕОБРАТИМО: у GetCourse нет идемпотентности, отправку нельзя отозвать. Всегда сначала preview и подтверждение пользователя. Аудитория: по дате (created_after) или по файлу (contacts). Поля сделки штампуются после отправки. Если у рассылки заданы тексты по сегментам, значение segment ВЫБИРАЕТ текст: назови пользователю выбранный текст ДО подтверждения и не запускай посегментный текст по created_after.",
9420
+ "inputSchema": {
9421
+ "type": "object",
9422
+ "required": [
9423
+ "explicit_confirmation"
9424
+ ],
9425
+ "additionalProperties": false,
9426
+ "properties": {
9427
+ "workspace_id": {
9428
+ "type": "string",
9429
+ "format": "uuid",
9430
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
9431
+ },
9432
+ "platform_id": {
9433
+ "type": "string",
9434
+ "format": "uuid",
9435
+ "description": "Можно опустить, если у рассылки задана «Платформа по умолчанию»."
9436
+ },
9437
+ "created_after": {
9438
+ "type": "string",
9439
+ "format": "date-time"
9440
+ },
9441
+ "message": {
9442
+ "type": "string",
9443
+ "minLength": 1,
9444
+ "maxLength": 4000,
9445
+ "description": "Разовый текст. Ровно один источник: message ЛИБО mailing_variant_id."
9446
+ },
9447
+ "mailing_variant_id": {
9448
+ "type": "string",
9449
+ "format": "uuid",
9450
+ "description": "Сохранённая рассылка: текст берётся из неё, метки — из её дефолтов."
9451
+ },
9452
+ "segment": {
9453
+ "type": "string",
9454
+ "maxLength": 200,
9455
+ "description": "Сегмент запуска. ⚠️ Аудиторию НЕ отбирает: когорту задают платформа и граница даты. ⚠️⚠️ Если у рассылки есть текст ИМЕННО для этого сегмента (message_text_by_segment), он выбирает текст запуска — и тогда аудитория обязана быть файловой (contacts): с created_after такой запуск отвергается 400, потому что текст ушёл бы всей базе после границы."
9456
+ },
9457
+ "product_code": {
9458
+ "type": "string",
9459
+ "maxLength": 200
9460
+ },
9461
+ "funnel": {
9462
+ "type": "string",
9463
+ "maxLength": 200
9464
+ },
9465
+ "explicit_confirmation": {
9466
+ "type": "boolean",
9467
+ "const": true,
9468
+ "description": "Подтверждение пользователя, полученное ПОСЛЕ показа охвата из preview."
9469
+ },
9470
+ "contacts": {
9471
+ "type": "array",
9472
+ "minItems": 1,
9473
+ "maxItems": 5000,
9474
+ "description": "Аудитория «по файлу»: контакты предсписка. Ровно одна аудитория на запуск — created_after ЛИБО contacts.",
9475
+ "items": {
9476
+ "type": "object",
9477
+ "required": [
9478
+ "contact_id"
9479
+ ],
9480
+ "additionalProperties": false,
9481
+ "properties": {
9482
+ "contact_id": {
9483
+ "type": "string",
9484
+ "pattern": "^\\d+$",
9485
+ "description": "getcourseUserId контакта (число в строковом виде)"
9486
+ },
9487
+ "deal_id": {
9488
+ "type": "string",
9489
+ "pattern": "^\\d+$",
9490
+ "description": "Пин сделки для штампа полей (число в строковом виде)"
9491
+ }
9492
+ }
9493
+ }
9494
+ },
9495
+ "deal_fields": {
9496
+ "type": "object",
9497
+ "propertyNames": {
9498
+ "pattern": "^\\d+$"
9499
+ },
9500
+ "additionalProperties": {
9501
+ "type": [
9502
+ "string",
9503
+ "number",
9504
+ "boolean",
9505
+ "null"
9506
+ ]
9507
+ },
9508
+ "description": "Поля сделки, проставляемые ПОСЛЕ успешной отправки (ключ — числовой fieldId). Ключ не передан — берутся дефолты рассылки; передан ПУСТОЙ объект — явное «на этом запуске без полей»."
9509
+ }
9510
+ }
9511
+ }
9512
+ },
9513
+ {
9514
+ "name": "besales_getcourse_cold_welcome_batch_start",
9515
+ "description": "Запустить ПАКЕТ сегментов «Первого сообщения»: несколько сегментов одним вызовом, у каждого свой список контактов, свои метки и свои поля сделки. НЕОБРАТИМО. Сегменты идут ПО ОЧЕРЕДИ — задачи импорта не могут выполняться параллельно. Весь пакет проверяется ДО первой отправки: сегмент без текста отменяет пакет целиком. Если у рассылки заданы посегментные тексты, каждый сегмент отправит СВОЙ текст.",
9516
+ "inputSchema": {
9517
+ "type": "object",
9518
+ "required": [
9519
+ "segments",
9520
+ "explicit_confirmation"
9521
+ ],
9522
+ "additionalProperties": false,
9523
+ "properties": {
9524
+ "workspace_id": {
9525
+ "type": "string",
9526
+ "format": "uuid",
9527
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
9528
+ },
9529
+ "platform_id": {
9530
+ "type": "string",
9531
+ "format": "uuid"
9532
+ },
9533
+ "message": {
9534
+ "type": "string",
9535
+ "minLength": 1,
9536
+ "maxLength": 4000
9537
+ },
9538
+ "mailing_variant_id": {
9539
+ "type": "string",
9540
+ "format": "uuid"
9541
+ },
9542
+ "segments": {
9543
+ "type": "array",
9544
+ "minItems": 1,
9545
+ "maxItems": 10,
9546
+ "items": {
9547
+ "type": "object",
9548
+ "additionalProperties": false,
9549
+ "required": [
9550
+ "contacts"
9551
+ ],
9552
+ "properties": {
9553
+ "segment": {
9554
+ "type": "string",
9555
+ "maxLength": 200,
9556
+ "description": "Сегмент блока. Он же выбирает текст рассылки, если у неё есть посегментные тексты."
9557
+ },
9558
+ "product_code": {
9559
+ "type": "string",
9560
+ "maxLength": 200
9561
+ },
9562
+ "funnel": {
9563
+ "type": "string",
9564
+ "maxLength": 200
9565
+ },
9566
+ "deal_fields": {
9567
+ "type": "object",
9568
+ "propertyNames": {
9569
+ "type": "string",
9570
+ "pattern": "^\\d+$"
9571
+ }
9572
+ },
9573
+ "contacts": {
9574
+ "type": "array",
9575
+ "minItems": 1,
9576
+ "maxItems": 5000,
9577
+ "items": {
9578
+ "type": "object",
9579
+ "additionalProperties": false,
9580
+ "required": [
9581
+ "contact_id"
9582
+ ],
9583
+ "properties": {
9584
+ "contact_id": {
9585
+ "type": "string",
9586
+ "pattern": "^\\d+$"
9587
+ },
9588
+ "deal_id": {
9589
+ "type": "string",
9590
+ "pattern": "^\\d+$"
9591
+ }
9592
+ }
9593
+ }
9594
+ }
9595
+ }
9596
+ }
9597
+ },
9598
+ "explicit_confirmation": {
9599
+ "type": "boolean",
9600
+ "const": true,
9601
+ "description": "Подтверждение пользователя. Обязательно: отправку нельзя отозвать."
9602
+ }
8900
9603
  }
8901
9604
  }
8902
9605
  },
8903
9606
  {
8904
- "name": "besales_broadcast_mailing_variant_delete",
8905
- "description": "Архивировать «Вариант рассылки», сохранив историческую аналитику и ссылки отложенных durable-run.",
9607
+ "name": "besales_getcourse_cold_welcome_batch_status",
9608
+ "description": "Состояние пакета: агрегат state и разбивка segments[] со своим статусом, importJobId и причиной отказа у каждого. stalled=true — драйвер оборвался, остаток пакета надо запустить заново.",
8906
9609
  "inputSchema": {
8907
9610
  "type": "object",
8908
9611
  "required": [
8909
- "mailing_variant_id",
9612
+ "batch_id"
9613
+ ],
9614
+ "additionalProperties": false,
9615
+ "properties": {
9616
+ "workspace_id": {
9617
+ "type": "string",
9618
+ "format": "uuid",
9619
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
9620
+ },
9621
+ "batch_id": {
9622
+ "type": "string",
9623
+ "format": "uuid"
9624
+ }
9625
+ }
9626
+ }
9627
+ },
9628
+ {
9629
+ "name": "besales_getcourse_cold_welcome_batch_resume",
9630
+ "description": "Возобновить остаток пакета «Первого сообщения» после обрыва драйвера (stalled). Источник текста хранится в плане — пересобирать списки контактов не нужно. Повтора отправки не будет: приветствие одноразово НА КОНТАКТ.",
9631
+ "inputSchema": {
9632
+ "type": "object",
9633
+ "required": [
9634
+ "batch_id"
9635
+ ],
9636
+ "additionalProperties": false,
9637
+ "properties": {
9638
+ "workspace_id": {
9639
+ "type": "string",
9640
+ "format": "uuid",
9641
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
9642
+ },
9643
+ "batch_id": {
9644
+ "type": "string",
9645
+ "format": "uuid"
9646
+ }
9647
+ }
9648
+ }
9649
+ },
9650
+ {
9651
+ "name": "besales_getcourse_cold_welcome_batch_cancel",
9652
+ "description": "Отменить ОСТАТОК пакета: не начатые сегменты и идущую задачу. Уже отправленное не отзывается.",
9653
+ "inputSchema": {
9654
+ "type": "object",
9655
+ "required": [
9656
+ "batch_id",
8910
9657
  "explicit_confirmation"
8911
9658
  ],
8912
9659
  "additionalProperties": false,
@@ -8916,14 +9663,219 @@
8916
9663
  "format": "uuid",
8917
9664
  "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
8918
9665
  },
8919
- "mailing_variant_id": {
9666
+ "batch_id": {
8920
9667
  "type": "string",
8921
9668
  "format": "uuid"
8922
9669
  },
8923
9670
  "explicit_confirmation": {
8924
9671
  "type": "boolean",
8925
9672
  "const": true,
8926
- "description": "Обязательно true после явного подтверждения пользователя."
9673
+ "description": "Подтверждение пользователя. Обязательно: отправку нельзя отозвать."
9674
+ }
9675
+ }
9676
+ }
9677
+ },
9678
+ {
9679
+ "name": "besales_getcourse_cold_welcome_cancel",
9680
+ "description": "Остановить идущую рассылку «Первое сообщение»: действует на остаток когорты (~10 секунд), уже отправленное не отзывается.",
9681
+ "inputSchema": {
9682
+ "type": "object",
9683
+ "required": [
9684
+ "job_id"
9685
+ ],
9686
+ "additionalProperties": false,
9687
+ "properties": {
9688
+ "workspace_id": {
9689
+ "type": "string",
9690
+ "format": "uuid",
9691
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
9692
+ },
9693
+ "job_id": {
9694
+ "type": "string",
9695
+ "format": "uuid"
9696
+ }
9697
+ }
9698
+ }
9699
+ },
9700
+ {
9701
+ "name": "besales_broadcast_launches_list",
9702
+ "description": "История запусков рассылок одним списком: наша отправка (cold_welcome, со снимком текста и разбивкой исходов) и волны по файлу (wave).",
9703
+ "inputSchema": {
9704
+ "type": "object",
9705
+ "required": [],
9706
+ "additionalProperties": false,
9707
+ "properties": {
9708
+ "workspace_id": {
9709
+ "type": "string",
9710
+ "format": "uuid",
9711
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
9712
+ },
9713
+ "mailing_variant_id": {
9714
+ "type": "string",
9715
+ "format": "uuid"
9716
+ },
9717
+ "limit": {
9718
+ "type": "integer",
9719
+ "minimum": 1,
9720
+ "maximum": 50
9721
+ }
9722
+ }
9723
+ }
9724
+ },
9725
+ {
9726
+ "name": "besales_dialogue_audit_config_get",
9727
+ "description": "Read-only настройки «Ревизора диалогов» на канале: включён ли плановый разбор, модель, час запуска, инструкции. isConfigured=false — строки конфига ещё нет, значения дефолтные. Запись настроек через MCP не выведена. Scope: read:analytics.",
9728
+ "inputSchema": {
9729
+ "type": "object",
9730
+ "required": [
9731
+ "platform_id"
9732
+ ],
9733
+ "additionalProperties": false,
9734
+ "properties": {
9735
+ "platform_id": {
9736
+ "type": "string",
9737
+ "format": "uuid",
9738
+ "description": "Канал, для которого настроен ревизор."
9739
+ }
9740
+ }
9741
+ }
9742
+ },
9743
+ {
9744
+ "name": "besales_dialogue_audit_runs_list",
9745
+ "description": "История прогонов ревизора на канале, курсорная пагинация (offset показал бы один прогон дважды). Scope: read:analytics.",
9746
+ "inputSchema": {
9747
+ "type": "object",
9748
+ "required": [
9749
+ "platform_id"
9750
+ ],
9751
+ "additionalProperties": false,
9752
+ "properties": {
9753
+ "platform_id": {
9754
+ "type": "string",
9755
+ "format": "uuid",
9756
+ "description": "Канал."
9757
+ },
9758
+ "cursor": {
9759
+ "type": "string",
9760
+ "description": "nextCursor предыдущей страницы."
9761
+ },
9762
+ "limit": {
9763
+ "type": "integer",
9764
+ "minimum": 1,
9765
+ "maximum": 100,
9766
+ "description": "Размер страницы."
9767
+ }
9768
+ }
9769
+ }
9770
+ },
9771
+ {
9772
+ "name": "besales_dialogue_audit_run_get",
9773
+ "description": "Отчёт прогона: статус, счётчики охвата (candidate/audited/failed segments), сводка, причина обрыва. Счётчики зафиксированы и не пересчитываются. Scope: read:analytics.",
9774
+ "inputSchema": {
9775
+ "type": "object",
9776
+ "required": [
9777
+ "run_id"
9778
+ ],
9779
+ "additionalProperties": false,
9780
+ "properties": {
9781
+ "run_id": {
9782
+ "type": "string",
9783
+ "format": "uuid",
9784
+ "description": "Прогон ревизора."
9785
+ }
9786
+ }
9787
+ }
9788
+ },
9789
+ {
9790
+ "name": "besales_dialogue_audit_findings",
9791
+ "description": "Находки прогона — материал для правки промпта. Фильтры: агент, категория, важность, статус разметки человеком (NEW/LIKED/DISLIKED). truncated=true означает обрезанный список. Разметка находок через MCP НЕ выведена: это человеческая оценка работы ревизора. Scope: read:analytics.",
9792
+ "inputSchema": {
9793
+ "type": "object",
9794
+ "required": [
9795
+ "run_id"
9796
+ ],
9797
+ "additionalProperties": false,
9798
+ "properties": {
9799
+ "run_id": {
9800
+ "type": "string",
9801
+ "format": "uuid",
9802
+ "description": "Прогон ревизора."
9803
+ },
9804
+ "agent_id": {
9805
+ "type": "string",
9806
+ "format": "uuid",
9807
+ "description": "Оставить находки одного агента."
9808
+ },
9809
+ "category": {
9810
+ "type": "string",
9811
+ "description": "Категория находки."
9812
+ },
9813
+ "severity": {
9814
+ "type": "string",
9815
+ "description": "Важность находки."
9816
+ },
9817
+ "status": {
9818
+ "type": "string",
9819
+ "enum": [
9820
+ "NEW",
9821
+ "LIKED",
9822
+ "DISLIKED"
9823
+ ],
9824
+ "description": "Разметка человеком. LIKED — ревизор прав, DISLIKED — человек находку отверг (применять её нельзя)."
9825
+ }
9826
+ }
9827
+ }
9828
+ },
9829
+ {
9830
+ "name": "besales_dialogue_audit_run_start",
9831
+ "description": "Запустить разбор сейчас. Durable: ответ приходит сразу с runId, работа идёт в очереди. Уже разобранное заново не оплачивается. 409 — на канале уже идёт прогон. Scope: mcp:platform-setup.",
9832
+ "inputSchema": {
9833
+ "type": "object",
9834
+ "required": [
9835
+ "platform_id"
9836
+ ],
9837
+ "additionalProperties": false,
9838
+ "properties": {
9839
+ "platform_id": {
9840
+ "type": "string",
9841
+ "format": "uuid",
9842
+ "description": "Канал."
9843
+ },
9844
+ "period_from": {
9845
+ "type": "string",
9846
+ "format": "date-time",
9847
+ "description": "Начало периода. Задаётся ВМЕСТЕ с period_to; без них — всё непроверенное."
9848
+ },
9849
+ "period_to": {
9850
+ "type": "string",
9851
+ "format": "date-time",
9852
+ "description": "Конец периода."
9853
+ },
9854
+ "explicit_confirmation": {
9855
+ "type": "boolean",
9856
+ "description": "Обязательно true. Операция тратит (или прерывает уже оплаченную) работу LLM клиента — подтверждается оператором явно."
9857
+ }
9858
+ }
9859
+ }
9860
+ },
9861
+ {
9862
+ "name": "besales_dialogue_audit_run_cancel",
9863
+ "description": "Остановить прогон. Переходит в CANCELLED (это не ошибка), захваченные отрезки возвращаются в пул, недоразобранное подхватит следующий прогон. Scope: mcp:platform-setup.",
9864
+ "inputSchema": {
9865
+ "type": "object",
9866
+ "required": [
9867
+ "run_id"
9868
+ ],
9869
+ "additionalProperties": false,
9870
+ "properties": {
9871
+ "run_id": {
9872
+ "type": "string",
9873
+ "format": "uuid",
9874
+ "description": "Прогон ревизора."
9875
+ },
9876
+ "explicit_confirmation": {
9877
+ "type": "boolean",
9878
+ "description": "Обязательно true. Операция тратит (или прерывает уже оплаченную) работу LLM клиента — подтверждается оператором явно."
8927
9879
  }
8928
9880
  }
8929
9881
  }
@@ -9118,7 +10070,7 @@
9118
10070
  }
9119
10071
  ],
9120
10072
  "summary": {
9121
- "total_tools": 169,
10073
+ "total_tools": 185,
9122
10074
  "tools_by_category": {
9123
10075
  "getcourse_wave": 10,
9124
10076
  "files_upload": 3,
@@ -9156,7 +10108,8 @@
9156
10108
  "dialog_script": 2,
9157
10109
  "broadcast_analytics": 2,
9158
10110
  "scheduled_tasks": 2,
9159
- "follow_up_read": 2
10111
+ "follow_up_read": 3,
10112
+ "dialogue_audit": 6
9160
10113
  },
9161
10114
  "external_execution_pairs": [
9162
10115
  "besales_icp_analysis_get_instructions / submit",
@@ -9192,6 +10145,7 @@
9192
10145
  "besales_trigger_upsert",
9193
10146
  "besales_behavior_update",
9194
10147
  "besales_followup_sequence_upsert",
10148
+ "besales_followup_sequence_clone",
9195
10149
  "besales_pipeline_settings_update",
9196
10150
  "besales_platform_settings_update",
9197
10151
  "besales_audit_revert"
@@ -9344,6 +10298,9 @@
9344
10298
  "besales_setup_session_create",
9345
10299
  "besales_setup_session_get",
9346
10300
  "besales_setup_step_submit_output"
10301
+ ],
10302
+ "newly_added_in_followup_reactions": [
10303
+ "besales_followup_reactions"
9347
10304
  ]
9348
10305
  }
9349
10306
  }