@besales/mcp 0.33.0 → 0.37.1

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 (50) hide show
  1. package/README.md +45 -12
  2. package/dist/http/api-client.d.ts +2 -0
  3. package/dist/http/api-client.js +55 -0
  4. package/dist/http/api-client.js.map +1 -1
  5. package/dist/resources/docs/agent-behavior.md +7 -5
  6. package/dist/resources/docs/prompt-anatomy.md +4 -4
  7. package/dist/resources/docs/prompt-principles.md +22 -3
  8. package/dist/schemas/mcp-tools.json +1369 -98
  9. package/dist/skills/besales-dialogue-audit/SKILL.md +6 -0
  10. package/dist/tools/definitions/broadcast-analytics.d.ts +28 -7
  11. package/dist/tools/definitions/broadcast-analytics.js +399 -33
  12. package/dist/tools/definitions/broadcast-analytics.js.map +1 -1
  13. package/dist/tools/definitions/broadcast-mailing-variants.d.ts +19 -0
  14. package/dist/tools/definitions/broadcast-mailing-variants.js +107 -0
  15. package/dist/tools/definitions/broadcast-mailing-variants.js.map +1 -0
  16. package/dist/tools/definitions/dialogue-audit.d.ts +23 -0
  17. package/dist/tools/definitions/dialogue-audit.js +155 -0
  18. package/dist/tools/definitions/dialogue-audit.js.map +1 -0
  19. package/dist/tools/definitions/follow-up-setup.d.ts +27 -0
  20. package/dist/tools/definitions/follow-up-setup.js +76 -0
  21. package/dist/tools/definitions/follow-up-setup.js.map +1 -0
  22. package/dist/tools/definitions/follow-up.d.ts +19 -0
  23. package/dist/tools/definitions/follow-up.js +81 -3
  24. package/dist/tools/definitions/follow-up.js.map +1 -1
  25. package/dist/tools/definitions/getcourse-wave.d.ts +147 -0
  26. package/dist/tools/definitions/getcourse-wave.js +505 -0
  27. package/dist/tools/definitions/getcourse-wave.js.map +1 -0
  28. package/dist/tools/definitions/platform-setup.d.ts +92 -20
  29. package/dist/tools/definitions/platform-setup.js +132 -537
  30. package/dist/tools/definitions/platform-setup.js.map +1 -1
  31. package/dist/tools/definitions/scheduled-tasks.d.ts +9 -0
  32. package/dist/tools/definitions/scheduled-tasks.js +49 -2
  33. package/dist/tools/definitions/scheduled-tasks.js.map +1 -1
  34. package/dist/tools/definitions/session.js +6 -4
  35. package/dist/tools/definitions/session.js.map +1 -1
  36. package/dist/tools/definitions/shared.d.ts +75 -13
  37. package/dist/tools/definitions/shared.js +120 -7
  38. package/dist/tools/definitions/shared.js.map +1 -1
  39. package/dist/tools/definitions.d.ts +171 -26
  40. package/dist/tools/definitions.js +4 -0
  41. package/dist/tools/definitions.js.map +1 -1
  42. package/dist/tools/registry-mapping-cases-core.d.ts +38 -0
  43. package/dist/tools/registry-mapping-cases-core.js +700 -0
  44. package/dist/tools/registry-mapping-cases-core.js.map +1 -0
  45. package/dist/tools/registry-mapping-cases-platform.d.ts +2 -0
  46. package/dist/tools/registry-mapping-cases-platform.js +954 -0
  47. package/dist/tools/registry-mapping-cases-platform.js.map +1 -0
  48. package/dist/tools/registry.js +12 -6
  49. package/dist/tools/registry.js.map +1 -1
  50. package/package.json +2 -2
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "title": "besales-mcp Tool Definitions",
4
4
  "version": "1.2.0-draft",
5
- "lastUpdated": "2026-07-26",
5
+ "lastUpdated": "2026-07-28",
6
6
  "description": "MCP tool schemas для besales-mcp npm package. Active v1.5 set содержит PromptHub/ICP/Sandbox/Knowledge external-execution operations и stateless Platform Setup Bridge direct tools. Setup Pipeline session tools сохранены как Phase 4+ future design, но не входят в active toolset.",
7
7
  "executionModes": {
8
8
  "summary": "Каждая active LLM-операция имеет 2 MCP tools: get_instructions + submit. Claude локально между tools выполняет LLM-вызовы своими моделями. Auto-detection через JWT scope mcp:* → external default.",
@@ -1266,6 +1266,11 @@
1266
1266
  "description": "Launch a GetCourse outbound wave (Step 1 import contacts + pin deals -> Step 2 send). Default launch_type=status. WITHOUT confirm=true it is a DRY-RUN and sends nothing. funnel is the canonical business-funnel key/name, never a batch/resend label; cohort_label names the concrete launch. product_code binds that funnel to the analytics product dictionary; product_name is its display name. contacts[].segment_entered_at is the exact segment-entry time; lead_last_active_at is legacy last activity only. Returns waveJobId — poll besales_getcourse_wave_status until COMPLETED. Scope: mcp:platform-setup.",
1267
1267
  "inputSchema": {
1268
1268
  "type": "object",
1269
+ "dependentRequired": {
1270
+ "segment_description": [
1271
+ "segment"
1272
+ ]
1273
+ },
1269
1274
  "required": [
1270
1275
  "platform_id",
1271
1276
  "crm_id",
@@ -1315,11 +1320,21 @@
1315
1320
  "maxLength": 200,
1316
1321
  "description": "Wave segment label (analytics)."
1317
1322
  },
1323
+ "segment_description": {
1324
+ "type": "string",
1325
+ "maxLength": 4000,
1326
+ "description": "Explicit business rule for segment selection. Requires segment; creates or updates its saved description."
1327
+ },
1318
1328
  "cohort_label": {
1319
1329
  "type": "string",
1320
1330
  "maxLength": 200,
1321
1331
  "description": "Человекочитаемое имя конкретного запуска волны; не подменяет каноническую бизнес-воронку."
1322
1332
  },
1333
+ "mailing_variant_id": {
1334
+ "type": "string",
1335
+ "format": "uuid",
1336
+ "description": "ID активного именованного варианта рассылки для сравнительной аналитики."
1337
+ },
1323
1338
  "message_variant": {
1324
1339
  "type": "string",
1325
1340
  "maxLength": 120,
@@ -1385,6 +1400,27 @@
1385
1400
  "type": "string",
1386
1401
  "description": "Optional GetCourse dialog id (resp_id) — needed for board-mode welcome."
1387
1402
  },
1403
+ "email": {
1404
+ "type": "string",
1405
+ "format": "email",
1406
+ "maxLength": 320,
1407
+ "description": "Optional contact email from the source audience."
1408
+ },
1409
+ "phone": {
1410
+ "type": "string",
1411
+ "maxLength": 64,
1412
+ "description": "Optional contact phone from the source audience."
1413
+ },
1414
+ "first_name": {
1415
+ "type": "string",
1416
+ "maxLength": 200,
1417
+ "description": "Optional contact first name from the source audience."
1418
+ },
1419
+ "last_name": {
1420
+ "type": "string",
1421
+ "maxLength": 200,
1422
+ "description": "Optional contact last name from the source audience."
1423
+ },
1388
1424
  "lead_last_active_at": {
1389
1425
  "type": "string",
1390
1426
  "format": "date-time",
@@ -1492,9 +1528,14 @@
1492
1528
  },
1493
1529
  {
1494
1530
  "name": "besales_getcourse_wave_run_start",
1495
- "description": "Start a durable GetCourse status-mode wave run for up to 5000 contacts. The run chunks the cohort, waits for the import lock, processes chunks sequentially and survives service restarts; poll one run via besales_getcourse_wave_run_status instead of building waves manually. WITHOUT confirm=true this is a DRY-RUN and no run is created. A real run requires BOTH confirm=true and explicit_confirmation=true. Only launch_type=status is supported; use besales_getcourse_wave_import for board/group. HTTP 409 returns the already active runId for the platform. Scope: mcp:platform-setup.",
1531
+ "description": "Start a durable GetCourse status-mode wave run for up to 5000 contacts. The run chunks the cohort, waits for the import lock, processes chunks sequentially and survives service restarts; poll one run via besales_getcourse_wave_run_status instead of building waves manually. WITHOUT confirm=true this is a DRY-RUN and no run is created. A real run requires confirm=true, explicit_confirmation=true, a stable launch_key and dry_run_hash from the latest dry-run. Reuse the same launch_key for retries of one intent. Only launch_type=status is supported; use besales_getcourse_wave_import for board/group. Scope: mcp:platform-setup.",
1496
1532
  "inputSchema": {
1497
1533
  "type": "object",
1534
+ "dependentRequired": {
1535
+ "segment_description": [
1536
+ "segment"
1537
+ ]
1538
+ },
1498
1539
  "required": [
1499
1540
  "platform_id",
1500
1541
  "crm_id",
@@ -1517,6 +1558,16 @@
1517
1558
  "format": "uuid",
1518
1559
  "description": "GetCourse CRM uuid."
1519
1560
  },
1561
+ "launch_key": {
1562
+ "type": "string",
1563
+ "format": "uuid",
1564
+ "description": "Stable UUID for one launch intent. Required when confirm=true; reuse it for HTTP/network retries."
1565
+ },
1566
+ "dry_run_hash": {
1567
+ "type": "string",
1568
+ "pattern": "^[0-9a-f]{64}$",
1569
+ "description": "Hash returned by the latest dry-run. Required when confirm=true."
1570
+ },
1520
1571
  "launch_type": {
1521
1572
  "type": "string",
1522
1573
  "enum": [
@@ -1542,11 +1593,21 @@
1542
1593
  "maxLength": 200,
1543
1594
  "description": "Wave segment label for analytics."
1544
1595
  },
1596
+ "segment_description": {
1597
+ "type": "string",
1598
+ "maxLength": 4000,
1599
+ "description": "Explicit business rule for segment selection. Requires segment; creates or updates its saved description."
1600
+ },
1545
1601
  "cohort_label": {
1546
1602
  "type": "string",
1547
1603
  "maxLength": 200,
1548
1604
  "description": "Human-readable name of this concrete run."
1549
1605
  },
1606
+ "mailing_variant_id": {
1607
+ "type": "string",
1608
+ "format": "uuid",
1609
+ "description": "ID of an active named mailing variant for comparative analytics."
1610
+ },
1550
1611
  "message_variant": {
1551
1612
  "type": "string",
1552
1613
  "maxLength": 120,
@@ -1579,7 +1640,7 @@
1579
1640
  "null"
1580
1641
  ]
1581
1642
  },
1582
- "description": "status mode: { \"<numeric fieldId>\": value } applied to every contact's deal."
1643
+ "description": "Optional manual override: { \"<numeric fieldId>\": value }. Saved platform field bindings are used when omitted."
1583
1644
  },
1584
1645
  "contacts": {
1585
1646
  "type": "array",
@@ -1608,6 +1669,27 @@
1608
1669
  "type": "string",
1609
1670
  "description": "Optional GetCourse dialog id (resp_id)."
1610
1671
  },
1672
+ "email": {
1673
+ "type": "string",
1674
+ "format": "email",
1675
+ "maxLength": 320,
1676
+ "description": "Optional contact email from the source audience."
1677
+ },
1678
+ "phone": {
1679
+ "type": "string",
1680
+ "maxLength": 64,
1681
+ "description": "Optional contact phone from the source audience."
1682
+ },
1683
+ "first_name": {
1684
+ "type": "string",
1685
+ "maxLength": 200,
1686
+ "description": "Optional contact first name from the source audience."
1687
+ },
1688
+ "last_name": {
1689
+ "type": "string",
1690
+ "maxLength": 200,
1691
+ "description": "Optional contact last name from the source audience."
1692
+ },
1611
1693
  "lead_last_active_at": {
1612
1694
  "type": "string",
1613
1695
  "format": "date-time",
@@ -1624,7 +1706,7 @@
1624
1706
  },
1625
1707
  "confirm": {
1626
1708
  "type": "boolean",
1627
- "description": "Without true the call is a DRY-RUN: no run is created and nothing is sent."
1709
+ "description": "Without true the call is a DRY-RUN. true also requires launch_key, dry_run_hash and explicit_confirmation=true."
1628
1710
  },
1629
1711
  "check_messenger_presence": {
1630
1712
  "type": "boolean",
@@ -1691,7 +1773,7 @@
1691
1773
  "enum": [
1692
1774
  true
1693
1775
  ],
1694
- "description": "Required together with confirm=true for a real run. MCP-only safety gate; not sent to the backend."
1776
+ "description": "Required with confirm=true together with launch_key and dry_run_hash. MCP-only safety gate; not sent to the backend."
1695
1777
  },
1696
1778
  "confirmation_reason": {
1697
1779
  "type": "string",
@@ -1832,19 +1914,23 @@
1832
1914
  "description": "Sequential status-mode segments. At most 2000 contacts per segment and 5000 contacts across the whole batch.",
1833
1915
  "items": {
1834
1916
  "type": "object",
1917
+ "dependentRequired": {
1918
+ "segment_description": [
1919
+ "segment"
1920
+ ]
1921
+ },
1835
1922
  "required": [
1836
- "mode",
1837
1923
  "contacts",
1838
1924
  "channels",
1839
1925
  "deal_fields"
1840
1926
  ],
1841
1927
  "properties": {
1842
- "mode": {
1928
+ "launch_type": {
1843
1929
  "type": "string",
1844
1930
  "enum": [
1845
1931
  "status"
1846
1932
  ],
1847
- "description": "Only status mode is supported."
1933
+ "description": "Only status mode is supported. Optional: the server defaults to status."
1848
1934
  },
1849
1935
  "contacts": {
1850
1936
  "type": "array",
@@ -1873,6 +1959,27 @@
1873
1959
  "type": "string",
1874
1960
  "description": "Optional GetCourse dialog id (resp_id)."
1875
1961
  },
1962
+ "email": {
1963
+ "type": "string",
1964
+ "format": "email",
1965
+ "maxLength": 320,
1966
+ "description": "Optional contact email from the source audience."
1967
+ },
1968
+ "phone": {
1969
+ "type": "string",
1970
+ "maxLength": 64,
1971
+ "description": "Optional contact phone from the source audience."
1972
+ },
1973
+ "first_name": {
1974
+ "type": "string",
1975
+ "maxLength": 200,
1976
+ "description": "Optional contact first name from the source audience."
1977
+ },
1978
+ "last_name": {
1979
+ "type": "string",
1980
+ "maxLength": 200,
1981
+ "description": "Optional contact last name from the source audience."
1982
+ },
1876
1983
  "lead_last_active_at": {
1877
1984
  "type": "string",
1878
1985
  "format": "date-time",
@@ -1917,11 +2024,21 @@
1917
2024
  "maxLength": 200,
1918
2025
  "description": "Segment label for analytics."
1919
2026
  },
2027
+ "segment_description": {
2028
+ "type": "string",
2029
+ "maxLength": 4000,
2030
+ "description": "Explicit business rule for segment selection. Requires segment; creates or updates its saved description."
2031
+ },
1920
2032
  "cohort_label": {
1921
2033
  "type": "string",
1922
2034
  "maxLength": 200,
1923
2035
  "description": "Human-readable name of this concrete segment run."
1924
2036
  },
2037
+ "mailing_variant_id": {
2038
+ "type": "string",
2039
+ "format": "uuid",
2040
+ "description": "ID of an active named mailing variant for this segment run."
2041
+ },
1925
2042
  "message_variant": {
1926
2043
  "type": "string",
1927
2044
  "maxLength": 120,
@@ -2732,7 +2849,7 @@
2732
2849
  },
2733
2850
  {
2734
2851
  "name": "besales_routing_rule_upsert",
2735
- "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.",
2736
2853
  "inputSchema": {
2737
2854
  "type": "object",
2738
2855
  "required": [
@@ -2788,14 +2905,21 @@
2788
2905
  "items": {
2789
2906
  "type": "object",
2790
2907
  "required": [
2791
- "custom_variable_id",
2792
- "variable_value"
2908
+ "custom_variable_id"
2793
2909
  ],
2794
2910
  "properties": {
2795
2911
  "custom_variable_id": {
2796
2912
  "type": "string",
2797
2913
  "format": "uuid"
2798
2914
  },
2915
+ "variable_values": {
2916
+ "type": "array",
2917
+ "minItems": 1,
2918
+ "maxItems": 50,
2919
+ "items": {
2920
+ "type": "string"
2921
+ }
2922
+ },
2799
2923
  "variable_value": {
2800
2924
  "type": "string"
2801
2925
  }
@@ -2899,6 +3023,14 @@
2899
3023
  },
2900
3024
  "confirmation_reason": {
2901
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."
2902
3034
  }
2903
3035
  }
2904
3036
  }
@@ -3006,7 +3138,7 @@
3006
3138
  },
3007
3139
  "media_handling": {
3008
3140
  "type": "object",
3009
- "description": "Стратегии обработки image/video/audio/document.",
3141
+ "description": "Стратегии обработки image/video/audio/document. PROCESS_WITH_LLM разбирает вложение по-разному: image → vision-модель, video → подпись как текст, document → извлечённый текст файла (PDF/DOCX/DOC/XLSX/XLS/CSV/TXT; скан без текстового слоя и неподдерживаемый формат уводят на оператора). Для audio его нет вовсе — там только SILENT и FIXED_RESPONSE, иначе бэкенд отвечает 400.",
3010
3142
  "properties": {
3011
3143
  "image": {
3012
3144
  "$ref": "#/$defs/mediaHandler"
@@ -3015,7 +3147,7 @@
3015
3147
  "$ref": "#/$defs/mediaHandler"
3016
3148
  },
3017
3149
  "audio": {
3018
- "$ref": "#/$defs/mediaHandler"
3150
+ "$ref": "#/$defs/plainMediaHandler"
3019
3151
  },
3020
3152
  "document": {
3021
3153
  "$ref": "#/$defs/mediaHandler"
@@ -3090,6 +3222,7 @@
3090
3222
  "bot_waiting_return_hours": {
3091
3223
  "type": "integer",
3092
3224
  "enum": [
3225
+ -1,
3093
3226
  0,
3094
3227
  1,
3095
3228
  3,
@@ -3226,6 +3359,7 @@
3226
3359
  "$defs": {
3227
3360
  "mediaHandler": {
3228
3361
  "type": "object",
3362
+ "description": "Обработчик вложения, поддерживающего разбор моделью (image, video, document).",
3229
3363
  "required": [
3230
3364
  "behavior"
3231
3365
  ],
@@ -3248,6 +3382,31 @@
3248
3382
  "type": "string"
3249
3383
  }
3250
3384
  }
3385
+ },
3386
+ "plainMediaHandler": {
3387
+ "type": "object",
3388
+ "description": "Обработчик вложения без разбора моделью (audio): у AudioHandlingBehavior нет значения PROCESS_WITH_LLM.",
3389
+ "required": [
3390
+ "behavior"
3391
+ ],
3392
+ "properties": {
3393
+ "behavior": {
3394
+ "type": "string",
3395
+ "enum": [
3396
+ "SILENT",
3397
+ "FIXED_RESPONSE"
3398
+ ]
3399
+ },
3400
+ "fixed_response_text": {
3401
+ "type": "string"
3402
+ },
3403
+ "call_operator": {
3404
+ "type": "boolean"
3405
+ },
3406
+ "operator_comment": {
3407
+ "type": "string"
3408
+ }
3409
+ }
3251
3410
  }
3252
3411
  }
3253
3412
  }
@@ -3318,7 +3477,7 @@
3318
3477
  "eventType",
3319
3478
  "variable"
3320
3479
  ],
3321
- "description": "Режим отбора контактов. Неизвестное значение НЕ включает ни один фильтр — цепочка ушла бы всем контактам канала, поэтому бэкенд его отвергает."
3480
+ "description": "БАЗОВЫЙ отбор: по статусу CRM, по типу события платформы либо variable = базового фильтра нет (отбор только по sequenceConditions). Условия по переменным ортогональны и добавляются через И: чтобы ветвить цепочки по варианту рассылки, сохранив отбор по событию, бери eventType и задай sequenceConditions, а НЕ variable. Неизвестное значение НЕ включает ни один фильтр — цепочка ушла бы всем контактам канала, поэтому бэкенд его отвергает."
3322
3481
  },
3323
3482
  "sequenceConditions": {
3324
3483
  "type": "array",
@@ -3358,7 +3517,7 @@
3358
3517
  }
3359
3518
  }
3360
3519
  },
3361
- "description": "Обязателен и непуст при filterMode=variable."
3520
+ "description": "Условия принадлежности контакта цепочке, соединяются через И. Применяются при ЛЮБОМ filterMode (при variable обязателен и непуст, иначе цепочка не выберет никого). Для ветвления по варианту рассылки: переменная WAVE_MAILING_VARIANT, значение — UUID варианта из каталога воркспейса, а НЕ его имя (first-ver будет отвергнут). Отдельные цепочки НЕ взаимоисключающи: прогресс изолирован по sequenceId, поэтому безусловная ловящая цепочка рядом с eq A и eq B не подстрахует, а удвоит отправку. Набор обязан быть строгим разбиением: eq A, eq B и fallback neq A AND neq B (у контакта без переменной eq/in ложно, neq истинно)."
3362
3521
  },
3363
3522
  "steps": {
3364
3523
  "type": "array",
@@ -3478,6 +3637,33 @@
3478
3637
  }
3479
3638
  }
3480
3639
  },
3640
+ {
3641
+ "name": "besales_followup_sequence_clone",
3642
+ "description": "Скопировать follow-up sequence на ТОЙ ЖЕ платформе. Копия всегда создаётся ВЫКЛЮЧЕННОЙ: прогресс изолирован по sequenceId, и включённая копия слала бы те же касания тем же контактам вторым потоком. Копируется только определение (имя, тип, триггер, config) — прогресс контактов, история отправок и запланированные сообщения не копируются. Имя не передано — сервер подберёт свободное (<имя>-copy, <имя>-copy-2, …). Cross-platform не поддерживается: конфиг ссылается на статусы CRM, агентов, файлы и переменные своей платформы.",
3643
+ "inputSchema": {
3644
+ "type": "object",
3645
+ "required": [
3646
+ "platform_id",
3647
+ "sequence_id"
3648
+ ],
3649
+ "properties": {
3650
+ "platform_id": {
3651
+ "type": "string",
3652
+ "format": "uuid",
3653
+ "description": "Платформа источника; копия приземляется на неё же."
3654
+ },
3655
+ "sequence_id": {
3656
+ "type": "string",
3657
+ "format": "uuid",
3658
+ "description": "Исходный FollowUpSequence для копирования."
3659
+ },
3660
+ "name": {
3661
+ "type": "string",
3662
+ "description": "Имя копии. Не передано — сервер подберёт свободное от имени источника; передано и занято — тот же подбор применится к нему."
3663
+ }
3664
+ }
3665
+ }
3666
+ },
3481
3667
  {
3482
3668
  "name": "besales_pipeline_settings_update",
3483
3669
  "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.",
@@ -3923,6 +4109,121 @@
3923
4109
  "null"
3924
4110
  ]
3925
4111
  },
4112
+ "wave_field_bindings": {
4113
+ "type": [
4114
+ "object",
4115
+ "null"
4116
+ ],
4117
+ "description": "School-scoped bindings of durable-wave roles to GetCourse deal custom-field IDs. Null clears all bindings.",
4118
+ "additionalProperties": false,
4119
+ "properties": {
4120
+ "product_value_source": {
4121
+ "type": "string",
4122
+ "enum": [
4123
+ "CODE",
4124
+ "NAME"
4125
+ ]
4126
+ },
4127
+ "launch_type": {
4128
+ "type": "object",
4129
+ "additionalProperties": false,
4130
+ "properties": {
4131
+ "field_id": {
4132
+ "type": "integer",
4133
+ "minimum": 1,
4134
+ "maximum": 2147483647
4135
+ },
4136
+ "field_label": {
4137
+ "type": "string",
4138
+ "minLength": 1
4139
+ }
4140
+ },
4141
+ "required": [
4142
+ "field_id",
4143
+ "field_label"
4144
+ ]
4145
+ },
4146
+ "product": {
4147
+ "type": "object",
4148
+ "additionalProperties": false,
4149
+ "properties": {
4150
+ "field_id": {
4151
+ "type": "integer",
4152
+ "minimum": 1,
4153
+ "maximum": 2147483647
4154
+ },
4155
+ "field_label": {
4156
+ "type": "string",
4157
+ "minLength": 1
4158
+ }
4159
+ },
4160
+ "required": [
4161
+ "field_id",
4162
+ "field_label"
4163
+ ]
4164
+ },
4165
+ "segment": {
4166
+ "type": "object",
4167
+ "additionalProperties": false,
4168
+ "properties": {
4169
+ "field_id": {
4170
+ "type": "integer",
4171
+ "minimum": 1,
4172
+ "maximum": 2147483647
4173
+ },
4174
+ "field_label": {
4175
+ "type": "string",
4176
+ "minLength": 1
4177
+ }
4178
+ },
4179
+ "required": [
4180
+ "field_id",
4181
+ "field_label"
4182
+ ]
4183
+ },
4184
+ "funnel": {
4185
+ "type": "object",
4186
+ "additionalProperties": false,
4187
+ "properties": {
4188
+ "field_id": {
4189
+ "type": "integer",
4190
+ "minimum": 1,
4191
+ "maximum": 2147483647
4192
+ },
4193
+ "field_label": {
4194
+ "type": "string",
4195
+ "minLength": 1
4196
+ }
4197
+ },
4198
+ "required": [
4199
+ "field_id",
4200
+ "field_label"
4201
+ ]
4202
+ },
4203
+ "channels": {
4204
+ "type": "object",
4205
+ "additionalProperties": false,
4206
+ "properties": {
4207
+ "field_id": {
4208
+ "type": "integer",
4209
+ "minimum": 1,
4210
+ "maximum": 2147483647
4211
+ },
4212
+ "field_label": {
4213
+ "type": "string",
4214
+ "minLength": 1
4215
+ }
4216
+ },
4217
+ "required": [
4218
+ "field_id",
4219
+ "field_label"
4220
+ ]
4221
+ }
4222
+ },
4223
+ "required": [
4224
+ "product_value_source"
4225
+ ]
4226
+ },
3926
4227
  "field_variable_map": {
3927
4228
  "type": [
3928
4229
  "array",
@@ -4300,6 +4601,54 @@
4300
4601
  }
4301
4602
  }
4302
4603
  },
4604
+ {
4605
+ "name": "besales_prompt_headroom",
4606
+ "description": "Сколько символов занимает промпт агента, сколько осталось до лимитов PromptLint (hard_fail 80000 / warn 40000) и вес разделов по «## ». Зови ПЕРЕД сборкой черновика: линтер срабатывает только на besales_prompt_patch_commit, и без этого перебор лимита выясняется уже после применения операций. Признак перебора — exceedsHardLimit; ровно на лимите (hardHeadroom=0) commit ещё проходит. `draft_id` — измерить черновик вместо закоммиченного промпта; черновик обязан принадлежать этому же агенту, иначе 404. Endpoint: GET /api/v2/agents/{agentId}/prompt/headroom. Scope: read:prompt-drafts.",
4607
+ "inputSchema": {
4608
+ "type": "object",
4609
+ "additionalProperties": false,
4610
+ "required": [
4611
+ "agent_id"
4612
+ ],
4613
+ "properties": {
4614
+ "agent_id": {
4615
+ "type": "string",
4616
+ "format": "uuid"
4617
+ },
4618
+ "draft_id": {
4619
+ "type": "string",
4620
+ "format": "uuid"
4621
+ }
4622
+ }
4623
+ }
4624
+ },
4625
+ {
4626
+ "name": "besales_prompt_diff",
4627
+ "description": "Расхождение закоммиченных промптов двух агентов одного workspace: `identicalBytes` (тексты совпадают побайтово — значит один и тот же набор patch-операций найдёт те же якоря; это НЕ гарантия одинакового исхода commit, lint резолвит канал каждого агента отдельно), `identicalNormalized` (различие только в пробелах), `onlyInBase` / `onlyInCompare` — строки, которых нет на другой стороне, с кратностями. Зови вместо чтения двух промптов целиком: парк из 30+ агентов на одном промпте иначе не влезает в контекст. Порядок строк и перемещения НЕ отслеживаются. Endpoint: POST /api/v2/agents/{agentId}/prompt/diff. Scope: read:prompt-drafts.",
4628
+ "inputSchema": {
4629
+ "type": "object",
4630
+ "additionalProperties": false,
4631
+ "required": [
4632
+ "agent_id",
4633
+ "compare_agent_id"
4634
+ ],
4635
+ "properties": {
4636
+ "agent_id": {
4637
+ "type": "string",
4638
+ "format": "uuid"
4639
+ },
4640
+ "compare_agent_id": {
4641
+ "type": "string",
4642
+ "format": "uuid"
4643
+ },
4644
+ "max_lines": {
4645
+ "type": "integer",
4646
+ "minimum": 1,
4647
+ "maximum": 1000
4648
+ }
4649
+ }
4650
+ }
4651
+ },
4303
4652
  {
4304
4653
  "name": "besales_prompt_patch_apply",
4305
4654
  "description": "S3.8: применяет batch operations к draft.currentContent. Resets TTL на 24h (activity-based). Возвращает `appliedCount` + `skippedCount` (anchor не найден / growth guard >30%). Endpoint: PATCH /api/v2/agents/{agentId}/prompt/drafts/{draftId}/operations. Scope: write:prompt-drafts. ВАЖНО: ведущие и замыкающие пробелы/переводы строк в replacement_text срезаются — чтобы вставить пустую строку-разделитель между абзацами, держи перевод строки В СЕРЕДИНЕ replacement_text или включи окружающий текст в anchor/target; иначе соседние заголовки/абзацы склеятся. Ответ возвращает весь обновлённый currentContent (может быть очень большим) — сверяйся по appliedCount/skippedCount, не перечитывай весь контент между батчами.",
@@ -4406,51 +4755,160 @@
4406
4755
  }
4407
4756
  },
4408
4757
  {
4409
- "name": "besales_prompt_lint",
4410
- "description": "S2.6 extra (v1.5 pipeline rules): standalone lint для текста промпта — позволяет проверить промпт ДО `besales_prompt_finalize`, чтобы избежать цикла «finalize → 400 → fix». Запускает те же чекеры, что и finalize: anti-AI baseline (hard_fail), officialese (warn), markdown в мессенджер-канале (hard_fail), §9 prohibitions / lint paradox (hard_fail), scope-consistency (warn). Если передан `agent_id`, бэкенд резолвит channel и agentScope из `AgentChat`. Endpoint: POST /api/v2/workspaces/{workspaceId}/prompt-lint. Scope: read:prompt-drafts.",
4758
+ "name": "besales_prompt_batch_start",
4759
+ "description": "Раскатывает ОДИН набор patch-операций по НЕСКОЛЬКИМ агентам одного workspace. Используй вместо ручного цикла patch_start→apply→commit: 33 агента × 3 вызова не укладываются в таймаут MCP, поэтому прогон фоновый — тулза возвращает `runId`, статус опрашивается через besales_prompt_batch_status. Две фазы: сначала у ВСЕХ агентов создаётся черновик, применяются операции и прогоняется полный lint; коммитятся только прошедшие. `all_or_nothing=true` — не коммитить никого, если хоть один не прошёл подготовку. `idempotency_key` делает повторный старт безопасным (вернёт тот же прогон). Агенты чужого workspace в прогон не попадают. Endpoint: POST /api/v2/prompt-batch/runs. Scope: write:prompt-drafts.",
4411
4760
  "inputSchema": {
4412
4761
  "type": "object",
4762
+ "additionalProperties": false,
4413
4763
  "required": [
4414
- "prompt_text"
4764
+ "agent_ids",
4765
+ "operations"
4415
4766
  ],
4416
4767
  "properties": {
4417
- "workspace_id": {
4418
- "type": "string",
4419
- "format": "uuid",
4420
- "description": "ID workspace (optional — auto-injected MCP сервером из активного workspace context, как у besales_icp_create)."
4421
- },
4422
- "prompt_text": {
4423
- "type": "string",
4424
- "description": "Текст промпта для проверки (как в `AgentChat.baseSystemPrompt`)."
4425
- },
4426
- "agent_id": {
4427
- "type": "string",
4428
- "format": "uuid",
4429
- "description": "Optional. Если передан — резолвит channel из `AgentChat.platformId → Platform.type` и agentScope из `AgentChat.agentScope`. Если не передан и явные `channel`/`agent_scope` тоже не переданы — markdown-checker для мессенджер-каналов и scope-consistency-checker пропускаются."
4430
- },
4431
- "channel": {
4432
- "type": "string",
4433
- "description": "Optional. Явная подмена канала (телеграм_бот / wazzup / instagram / ...). Если есть `agent_id`, тут можно перекрыть резолв."
4434
- },
4435
- "agent_scope": {
4436
- "type": "string",
4437
- "enum": [
4438
- "sale",
4439
- "reactivation",
4440
- "support",
4441
- "onboarding",
4442
- "faq",
4443
- "qualification",
4444
- "complaint",
4445
- "other"
4446
- ],
4447
- "description": "Optional. Явная подмена scope для scope-consistency checker."
4768
+ "agent_ids": {
4769
+ "type": "array",
4770
+ "minItems": 1,
4771
+ "maxItems": 200,
4772
+ "items": {
4773
+ "type": "string",
4774
+ "format": "uuid"
4775
+ }
4448
4776
  },
4449
- "feedback_banned_terms": {
4777
+ "operations": {
4450
4778
  "type": "array",
4779
+ "minItems": 1,
4451
4780
  "items": {
4452
- "type": "string"
4453
- },
4781
+ "type": "object",
4782
+ "required": [
4783
+ "type"
4784
+ ],
4785
+ "properties": {
4786
+ "id": {
4787
+ "type": "string"
4788
+ },
4789
+ "type": {
4790
+ "type": "string",
4791
+ "enum": [
4792
+ "replace_text",
4793
+ "replace_all_text",
4794
+ "insert_after_text",
4795
+ "insert_before_text",
4796
+ "remove_text",
4797
+ "move_text_after_text"
4798
+ ]
4799
+ },
4800
+ "target_text": {
4801
+ "type": "string"
4802
+ },
4803
+ "anchor_text": {
4804
+ "type": "string"
4805
+ },
4806
+ "replacement_text": {
4807
+ "type": "string"
4808
+ },
4809
+ "match_variants": {
4810
+ "type": "array",
4811
+ "items": {
4812
+ "type": "string"
4813
+ }
4814
+ }
4815
+ }
4816
+ }
4817
+ },
4818
+ "all_or_nothing": {
4819
+ "type": "boolean"
4820
+ },
4821
+ "idempotency_key": {
4822
+ "type": "string",
4823
+ "maxLength": 200
4824
+ },
4825
+ "platform_id": {
4826
+ "type": "string",
4827
+ "format": "uuid"
4828
+ }
4829
+ }
4830
+ }
4831
+ },
4832
+ {
4833
+ "name": "besales_prompt_batch_status",
4834
+ "description": "Статус пакетной раскатки: счётчики по статусам и per-agent исход. `counts.PENDING+PREPARED > 0` — прогон ещё идёт, опроси позже. `SKIPPED` — НЕ ошибка, смотри `skipReason`: AGENT_NOT_FOUND / DRAFT_CONFLICT_OTHER_USER (у агента чужой незакоммиченный черновик) / NO_OPERATIONS_APPLIED (у этого агента промпт другой, якоря не нашлись) / PROMPT_UNCHANGED / ALL_OR_NOTHING_ABORTED. У `FAILED` смотри `errorMessage` и `lintIssues`. Endpoint: GET /api/v2/prompt-batch/runs/{runId}. Scope: read:prompt-drafts.",
4835
+ "inputSchema": {
4836
+ "type": "object",
4837
+ "additionalProperties": false,
4838
+ "required": [
4839
+ "run_id"
4840
+ ],
4841
+ "properties": {
4842
+ "run_id": {
4843
+ "type": "string",
4844
+ "format": "uuid"
4845
+ }
4846
+ }
4847
+ }
4848
+ },
4849
+ {
4850
+ "name": "besales_prompt_batch_resume",
4851
+ "description": "Докатывает прогон: повторяет ТОЛЬКО агентов со статусом FAILED, уже закоммиченных не трогает (повторное применение операций удвоило бы вставки). Нужен, потому что клонированный через GUI агент структурно 409-ит на каждом commit — без докатки такой прогон навсегда остаётся PARTIAL. Отказывает с 400, если прогон ещё выполняется; заброшенный прогон (воркер упал, heartbeat протух) перезанимается. Endpoint: POST /api/v2/prompt-batch/runs/{runId}/resume. Scope: write:prompt-drafts.",
4852
+ "inputSchema": {
4853
+ "type": "object",
4854
+ "additionalProperties": false,
4855
+ "required": [
4856
+ "run_id"
4857
+ ],
4858
+ "properties": {
4859
+ "run_id": {
4860
+ "type": "string",
4861
+ "format": "uuid"
4862
+ }
4863
+ }
4864
+ }
4865
+ },
4866
+ {
4867
+ "name": "besales_prompt_lint",
4868
+ "description": "S2.6 extra (v1.5 pipeline rules): standalone lint для текста промпта — позволяет проверить промпт ДО `besales_prompt_finalize`, чтобы избежать цикла «finalize → 400 → fix». Запускает те же чекеры, что и finalize: anti-AI baseline (hard_fail), officialese (warn), markdown в мессенджер-канале (hard_fail), §9 prohibitions / lint paradox (hard_fail), scope-consistency (warn). Если передан `agent_id`, бэкенд резолвит channel и agentScope из `AgentChat`. Endpoint: POST /api/v2/workspaces/{workspaceId}/prompt-lint. Scope: read:prompt-drafts.",
4869
+ "inputSchema": {
4870
+ "type": "object",
4871
+ "required": [
4872
+ "prompt_text"
4873
+ ],
4874
+ "properties": {
4875
+ "workspace_id": {
4876
+ "type": "string",
4877
+ "format": "uuid",
4878
+ "description": "ID workspace (optional — auto-injected MCP сервером из активного workspace context, как у besales_icp_create)."
4879
+ },
4880
+ "prompt_text": {
4881
+ "type": "string",
4882
+ "description": "Текст промпта для проверки (как в `AgentChat.baseSystemPrompt`)."
4883
+ },
4884
+ "agent_id": {
4885
+ "type": "string",
4886
+ "format": "uuid",
4887
+ "description": "Optional. Если передан — резолвит channel из `AgentChat.platformId → Platform.type` и agentScope из `AgentChat.agentScope`. Если не передан и явные `channel`/`agent_scope` тоже не переданы — markdown-checker для мессенджер-каналов и scope-consistency-checker пропускаются."
4888
+ },
4889
+ "channel": {
4890
+ "type": "string",
4891
+ "description": "Optional. Явная подмена канала (телеграм_бот / wazzup / instagram / ...). Если есть `agent_id`, тут можно перекрыть резолв."
4892
+ },
4893
+ "agent_scope": {
4894
+ "type": "string",
4895
+ "enum": [
4896
+ "sale",
4897
+ "reactivation",
4898
+ "support",
4899
+ "onboarding",
4900
+ "faq",
4901
+ "qualification",
4902
+ "complaint",
4903
+ "other"
4904
+ ],
4905
+ "description": "Optional. Явная подмена scope для scope-consistency checker."
4906
+ },
4907
+ "feedback_banned_terms": {
4908
+ "type": "array",
4909
+ "items": {
4910
+ "type": "string"
4911
+ },
4454
4912
  "description": "Optional. Дополнительный словарь banned terms (warn-category) — например из §07 Sheets feedback."
4455
4913
  }
4456
4914
  }
@@ -7610,7 +8068,7 @@
7610
8068
  },
7611
8069
  {
7612
8070
  "name": "besales_broadcast_analytics_get",
7613
- "description": "Read-only authoritative агрегат страницы /broadcast-analytics по дням и измерениям. Метрики считаются по получателям волн/доставке/событиям, а не по строкам сообщений. Scope: read:analytics.",
8071
+ "description": "Read-only все данные страницы /broadcast-analytics: отчёты, drill-down, справочники сегментов и продуктов, качество данных и подтверждения оплат. Выбери report; общие фильтры совпадают с UI. Scope: read:analytics.",
7614
8072
  "inputSchema": {
7615
8073
  "type": "object",
7616
8074
  "required": [],
@@ -7621,6 +8079,28 @@
7621
8079
  "format": "uuid",
7622
8080
  "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
7623
8081
  },
8082
+ "report": {
8083
+ "type": "string",
8084
+ "enum": [
8085
+ "summary",
8086
+ "cohorts",
8087
+ "skip_reasons",
8088
+ "recipients",
8089
+ "deals",
8090
+ "action_failures",
8091
+ "indirect_payments",
8092
+ "response_windows",
8093
+ "insights",
8094
+ "recent_leads",
8095
+ "data_quality",
8096
+ "segments_catalog",
8097
+ "funnel_products",
8098
+ "payment_candidates",
8099
+ "payment_candidates_summary"
8100
+ ],
8101
+ "default": "summary",
8102
+ "description": "Какой отчёт страницы вернуть. Для recipients нужен recipient_metric, для deals — deal_metric."
8103
+ },
7624
8104
  "mode": {
7625
8105
  "type": "string",
7626
8106
  "enum": [
@@ -7651,31 +8131,88 @@
7651
8131
  "format": "uuid"
7652
8132
  },
7653
8133
  "funnel": {
7654
- "type": "string",
7655
- "minLength": 1,
7656
- "description": "Точная бизнес-воронка волны."
8134
+ "oneOf": [
8135
+ {
8136
+ "type": "string",
8137
+ "minLength": 1
8138
+ },
8139
+ {
8140
+ "type": "array",
8141
+ "minItems": 1,
8142
+ "maxItems": 50,
8143
+ "items": {
8144
+ "type": "string",
8145
+ "minLength": 1
8146
+ }
8147
+ }
8148
+ ],
8149
+ "description": "Одна или несколько бизнес-воронок волны."
7657
8150
  },
7658
8151
  "funnel_mode": {
7659
8152
  "type": "string",
7660
8153
  "enum": [
7661
8154
  "none"
7662
8155
  ],
7663
- "description": "Явно выбрать строки без воронки."
8156
+ "description": "Добавить строки без воронки. Можно сочетать с funnel: значения и NULL объединяются через OR."
7664
8157
  },
7665
8158
  "segment": {
7666
- "type": "string",
7667
- "minLength": 1
8159
+ "oneOf": [
8160
+ {
8161
+ "type": "string",
8162
+ "minLength": 1
8163
+ },
8164
+ {
8165
+ "type": "array",
8166
+ "minItems": 1,
8167
+ "maxItems": 50,
8168
+ "items": {
8169
+ "type": "string",
8170
+ "minLength": 1
8171
+ }
8172
+ }
8173
+ ]
8174
+ },
8175
+ "mailing_variant_id": {
8176
+ "oneOf": [
8177
+ {
8178
+ "type": "string",
8179
+ "format": "uuid"
8180
+ },
8181
+ {
8182
+ "type": "array",
8183
+ "minItems": 1,
8184
+ "maxItems": 50,
8185
+ "items": {
8186
+ "type": "string",
8187
+ "format": "uuid"
8188
+ }
8189
+ }
8190
+ ],
8191
+ "description": "Один или несколько ID именованных вариантов рассылки."
7668
8192
  },
7669
8193
  "product": {
7670
- "type": "string",
7671
- "minLength": 1
8194
+ "oneOf": [
8195
+ {
8196
+ "type": "string",
8197
+ "minLength": 1
8198
+ },
8199
+ {
8200
+ "type": "array",
8201
+ "minItems": 1,
8202
+ "maxItems": 50,
8203
+ "items": {
8204
+ "type": "string",
8205
+ "minLength": 1
8206
+ }
8207
+ }
8208
+ ]
7672
8209
  },
7673
8210
  "product_mode": {
7674
8211
  "type": "string",
7675
8212
  "enum": [
7676
8213
  "none"
7677
8214
  ],
7678
- "description": "Явно выбрать строки без продукта."
8215
+ "description": "Добавить строки без продукта. Можно сочетать с product: значения и NULL объединяются через OR."
7679
8216
  },
7680
8217
  "view": {
7681
8218
  "type": "string",
@@ -7685,38 +8222,221 @@
7685
8222
  ],
7686
8223
  "default": "period",
7687
8224
  "description": "period — по дате события (как вкладка по дням); cohort — по дате запуска волны."
7688
- }
7689
- }
7690
- }
7691
- },
7692
- {
7693
- "name": "besales_broadcast_cohorts_list",
7694
- "description": "Read-only результаты отдельных запусков рассылок: label, funnel, segment, product, channels, found/sent/delivered/entered/handed/payments/notSent. Scope: read:analytics.",
7695
- "inputSchema": {
7696
- "type": "object",
7697
- "required": [],
7698
- "additionalProperties": false,
7699
- "properties": {
7700
- "workspace_id": {
8225
+ },
8226
+ "freshness": {
8227
+ "oneOf": [
8228
+ {
8229
+ "type": "string",
8230
+ "enum": [
8231
+ "0-7",
8232
+ "8-14",
8233
+ "15-30",
8234
+ "31+"
8235
+ ]
8236
+ },
8237
+ {
8238
+ "type": "array",
8239
+ "minItems": 1,
8240
+ "maxItems": 4,
8241
+ "items": {
8242
+ "type": "string",
8243
+ "enum": [
8244
+ "0-7",
8245
+ "8-14",
8246
+ "15-30",
8247
+ "31+"
8248
+ ]
8249
+ }
8250
+ }
8251
+ ],
8252
+ "description": "Корзины свежести лида; контакты без даты при активном фильтре исключаются."
8253
+ },
8254
+ "channels": {
8255
+ "oneOf": [
8256
+ {
8257
+ "type": "string",
8258
+ "enum": [
8259
+ "Site",
8260
+ "Email",
8261
+ "SMS",
8262
+ "Telegram",
8263
+ "Facebook",
8264
+ "VK",
8265
+ "Chatium",
8266
+ "WhatsApp",
8267
+ "Viber",
8268
+ "MAX",
8269
+ "UNKNOWN"
8270
+ ]
8271
+ },
8272
+ {
8273
+ "type": "array",
8274
+ "minItems": 1,
8275
+ "maxItems": 11,
8276
+ "items": {
8277
+ "type": "string",
8278
+ "enum": [
8279
+ "Site",
8280
+ "Email",
8281
+ "SMS",
8282
+ "Telegram",
8283
+ "Facebook",
8284
+ "VK",
8285
+ "Chatium",
8286
+ "WhatsApp",
8287
+ "Viber",
8288
+ "MAX",
8289
+ "UNKNOWN"
8290
+ ]
8291
+ }
8292
+ }
8293
+ ]
8294
+ },
8295
+ "date": {
7701
8296
  "type": "string",
7702
- "format": "uuid",
7703
- "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
8297
+ "format": "date",
8298
+ "description": "День кликнутой ячейки для drill-down/skip_reasons."
7704
8299
  },
7705
- "mode": {
8300
+ "channel": {
7706
8301
  "type": "string",
7707
8302
  "enum": [
7708
- "all",
7709
- "days",
7710
- "range"
8303
+ "Site",
8304
+ "Email",
8305
+ "SMS",
8306
+ "Telegram",
8307
+ "Facebook",
8308
+ "VK",
8309
+ "Chatium",
8310
+ "WhatsApp",
8311
+ "Viber",
8312
+ "MAX",
8313
+ "UNKNOWN"
7711
8314
  ],
7712
- "default": "days"
8315
+ "description": "Канал кликнутой ячейки drill-down."
7713
8316
  },
7714
- "days": {
8317
+ "import_job_id": {
8318
+ "type": "string",
8319
+ "minLength": 1,
8320
+ "description": "ID конкретной волны для skip_reasons/drill-down."
8321
+ },
8322
+ "page": {
7715
8323
  "type": "integer",
7716
8324
  "minimum": 1
7717
8325
  },
7718
- "from": {
7719
- "type": "string",
8326
+ "page_size": {
8327
+ "type": "integer",
8328
+ "minimum": 1,
8329
+ "maximum": 200,
8330
+ "description": "До 200 для аналитических drill-down; до 100 для payment_candidates."
8331
+ },
8332
+ "recipient_metric": {
8333
+ "type": "string",
8334
+ "enum": [
8335
+ "sent",
8336
+ "delivered",
8337
+ "entered",
8338
+ "deepDialog",
8339
+ "handedOff",
8340
+ "notDelivered",
8341
+ "notSent"
8342
+ ],
8343
+ "description": "Обязателен для report=recipients."
8344
+ },
8345
+ "deal_metric": {
8346
+ "type": "string",
8347
+ "enum": [
8348
+ "issued",
8349
+ "paid",
8350
+ "withoutCohort"
8351
+ ],
8352
+ "description": "Обязателен для report=deals."
8353
+ },
8354
+ "reason": {
8355
+ "type": "string",
8356
+ "enum": [
8357
+ "NO_MESSENGER",
8358
+ "ACTIVE_INVOICE_SAME_PRODUCT",
8359
+ "ACTIVE_DEAL_SAME_PRODUCT",
8360
+ "PAID_SAME_PRODUCT",
8361
+ "ACTIVE_DEAL_OTHER_PRODUCT",
8362
+ "MANAGER_ASSIGNED_ACTIVE_DEAL",
8363
+ "PRODUCT_CONTEXT_MISSING",
8364
+ "GETCOURSE_CHECK_ERROR",
8365
+ "ALREADY_SENT",
8366
+ "USER_NOT_FOUND"
8367
+ ],
8368
+ "description": "Причина для report=recipients + recipient_metric=notSent."
8369
+ },
8370
+ "action_type": {
8371
+ "type": "string",
8372
+ "description": "Точный ActionType для сужения report=action_failures."
8373
+ },
8374
+ "payment_view": {
8375
+ "type": "string",
8376
+ "enum": [
8377
+ "decidable",
8378
+ "excluded",
8379
+ "resolved"
8380
+ ],
8381
+ "description": "Только для payment_candidates; не сочетать с payment_status/payment_eligibility."
8382
+ },
8383
+ "payment_status": {
8384
+ "type": "string",
8385
+ "enum": [
8386
+ "PENDING",
8387
+ "CONFIRMED",
8388
+ "CONFIRMED_INDIRECT",
8389
+ "REJECTED"
8390
+ ],
8391
+ "description": "Только для payment_candidates без payment_view."
8392
+ },
8393
+ "payment_eligibility": {
8394
+ "type": "string",
8395
+ "enum": [
8396
+ "PENDING_CHECK",
8397
+ "VERIFIED",
8398
+ "VERIFIED_WEAK",
8399
+ "UNVERIFIED",
8400
+ "EXCLUDED_NON_AUTOWEB",
8401
+ "EXCLUDED_PREEXISTING"
8402
+ ],
8403
+ "description": "Только для payment_candidates без payment_view."
8404
+ },
8405
+ "include_archived": {
8406
+ "type": "boolean",
8407
+ "description": "Только для report=payment_candidates."
8408
+ }
8409
+ }
8410
+ }
8411
+ },
8412
+ {
8413
+ "name": "besales_broadcast_cohorts_list",
8414
+ "description": "Read-only результаты отдельных запусков рассылок: label, funnel, segment, product, channels, found/sent/delivered/entered/handed/payments/notSent. Scope: read:analytics.",
8415
+ "inputSchema": {
8416
+ "type": "object",
8417
+ "required": [],
8418
+ "additionalProperties": false,
8419
+ "properties": {
8420
+ "workspace_id": {
8421
+ "type": "string",
8422
+ "format": "uuid",
8423
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
8424
+ },
8425
+ "mode": {
8426
+ "type": "string",
8427
+ "enum": [
8428
+ "all",
8429
+ "days",
8430
+ "range"
8431
+ ],
8432
+ "default": "days"
8433
+ },
8434
+ "days": {
8435
+ "type": "integer",
8436
+ "minimum": 1
8437
+ },
8438
+ "from": {
8439
+ "type": "string",
7720
8440
  "format": "date",
7721
8441
  "description": "Начальная календарная дата МСК (YYYY-MM-DD) для mode=range."
7722
8442
  },
@@ -7730,8 +8450,21 @@
7730
8450
  "format": "uuid"
7731
8451
  },
7732
8452
  "funnel": {
7733
- "type": "string",
7734
- "minLength": 1
8453
+ "oneOf": [
8454
+ {
8455
+ "type": "string",
8456
+ "minLength": 1
8457
+ },
8458
+ {
8459
+ "type": "array",
8460
+ "minItems": 1,
8461
+ "maxItems": 50,
8462
+ "items": {
8463
+ "type": "string",
8464
+ "minLength": 1
8465
+ }
8466
+ }
8467
+ ]
7735
8468
  },
7736
8469
  "funnel_mode": {
7737
8470
  "type": "string",
@@ -7740,18 +8473,137 @@
7740
8473
  ]
7741
8474
  },
7742
8475
  "segment": {
7743
- "type": "string",
7744
- "minLength": 1
8476
+ "oneOf": [
8477
+ {
8478
+ "type": "string",
8479
+ "minLength": 1
8480
+ },
8481
+ {
8482
+ "type": "array",
8483
+ "minItems": 1,
8484
+ "maxItems": 50,
8485
+ "items": {
8486
+ "type": "string",
8487
+ "minLength": 1
8488
+ }
8489
+ }
8490
+ ]
8491
+ },
8492
+ "mailing_variant_id": {
8493
+ "oneOf": [
8494
+ {
8495
+ "type": "string",
8496
+ "format": "uuid"
8497
+ },
8498
+ {
8499
+ "type": "array",
8500
+ "minItems": 1,
8501
+ "maxItems": 50,
8502
+ "items": {
8503
+ "type": "string",
8504
+ "format": "uuid"
8505
+ }
8506
+ }
8507
+ ]
7745
8508
  },
7746
8509
  "product": {
7747
- "type": "string",
7748
- "minLength": 1
8510
+ "oneOf": [
8511
+ {
8512
+ "type": "string",
8513
+ "minLength": 1
8514
+ },
8515
+ {
8516
+ "type": "array",
8517
+ "minItems": 1,
8518
+ "maxItems": 50,
8519
+ "items": {
8520
+ "type": "string",
8521
+ "minLength": 1
8522
+ }
8523
+ }
8524
+ ]
7749
8525
  },
7750
8526
  "product_mode": {
7751
8527
  "type": "string",
7752
8528
  "enum": [
7753
8529
  "none"
7754
8530
  ]
8531
+ },
8532
+ "freshness": {
8533
+ "oneOf": [
8534
+ {
8535
+ "type": "string",
8536
+ "enum": [
8537
+ "0-7",
8538
+ "8-14",
8539
+ "15-30",
8540
+ "31+"
8541
+ ]
8542
+ },
8543
+ {
8544
+ "type": "array",
8545
+ "minItems": 1,
8546
+ "maxItems": 4,
8547
+ "items": {
8548
+ "type": "string",
8549
+ "enum": [
8550
+ "0-7",
8551
+ "8-14",
8552
+ "15-30",
8553
+ "31+"
8554
+ ]
8555
+ }
8556
+ }
8557
+ ]
8558
+ },
8559
+ "channels": {
8560
+ "oneOf": [
8561
+ {
8562
+ "type": "string",
8563
+ "enum": [
8564
+ "Site",
8565
+ "Email",
8566
+ "SMS",
8567
+ "Telegram",
8568
+ "Facebook",
8569
+ "VK",
8570
+ "Chatium",
8571
+ "WhatsApp",
8572
+ "Viber",
8573
+ "MAX",
8574
+ "UNKNOWN"
8575
+ ]
8576
+ },
8577
+ {
8578
+ "type": "array",
8579
+ "minItems": 1,
8580
+ "maxItems": 11,
8581
+ "items": {
8582
+ "type": "string",
8583
+ "enum": [
8584
+ "Site",
8585
+ "Email",
8586
+ "SMS",
8587
+ "Telegram",
8588
+ "Facebook",
8589
+ "VK",
8590
+ "Chatium",
8591
+ "WhatsApp",
8592
+ "Viber",
8593
+ "MAX",
8594
+ "UNKNOWN"
8595
+ ]
8596
+ }
8597
+ }
8598
+ ]
8599
+ },
8600
+ "view": {
8601
+ "type": "string",
8602
+ "enum": [
8603
+ "cohort",
8604
+ "period"
8605
+ ],
8606
+ "default": "period"
7755
8607
  }
7756
8608
  }
7757
8609
  }
@@ -7814,6 +8666,77 @@
7814
8666
  }
7815
8667
  }
7816
8668
  },
8669
+ {
8670
+ "name": "besales_followup_reactions",
8671
+ "description": "Read-only аналитика дожимов: на какой шаг follow-up-цепочки контакт реально отреагировал. Метрик ДВЕ — операционная (следует за длиной окна шага, шаги по ней сравнивать нельзя) и сравнительная на равном горизонте (сравнивать можно только при comparableReliable=true). Срезы по сегменту/продукту/мессенджеру доступны только у каналов с рассылками. Scope: read:analytics.",
8672
+ "inputSchema": {
8673
+ "type": "object",
8674
+ "required": [
8675
+ "platform_id",
8676
+ "from",
8677
+ "to"
8678
+ ],
8679
+ "additionalProperties": false,
8680
+ "properties": {
8681
+ "platform_id": {
8682
+ "type": "string",
8683
+ "format": "uuid"
8684
+ },
8685
+ "from": {
8686
+ "type": "string",
8687
+ "format": "date",
8688
+ "description": "Начало периода по дате отправки шага (YYYY-MM-DD, московские сутки)."
8689
+ },
8690
+ "to": {
8691
+ "type": "string",
8692
+ "format": "date",
8693
+ "description": "Конец периода. Период длиннее 366 суток отвергается с 400."
8694
+ },
8695
+ "sequence_id": {
8696
+ "type": "array",
8697
+ "items": {
8698
+ "type": "string",
8699
+ "format": "uuid"
8700
+ },
8701
+ "description": "Фильтр цепочек. НЕ влияет на атрибуцию: окно ответа считается по полной шкале касаний."
8702
+ },
8703
+ "horizon_minutes": {
8704
+ "type": "integer",
8705
+ "enum": [
8706
+ 30,
8707
+ 60,
8708
+ 90,
8709
+ 180,
8710
+ 360,
8711
+ 720,
8712
+ 1440
8713
+ ],
8714
+ "description": "Горизонт сравнительной метрики, минуты. По умолчанию 90."
8715
+ },
8716
+ "segment": {
8717
+ "type": "array",
8718
+ "items": {
8719
+ "type": "string"
8720
+ },
8721
+ "description": "Сегменты волны; доступные значения приходят в ответе (dimensions.segments)."
8722
+ },
8723
+ "product": {
8724
+ "type": "array",
8725
+ "items": {
8726
+ "type": "string"
8727
+ },
8728
+ "description": "Продукты волны (dimensions.products)."
8729
+ },
8730
+ "channel": {
8731
+ "type": "array",
8732
+ "items": {
8733
+ "type": "string"
8734
+ },
8735
+ "description": "Транспорты волны (dimensions.channels): Telegram, WhatsApp, MAX, VK."
8736
+ }
8737
+ }
8738
+ }
8739
+ },
7817
8740
  {
7818
8741
  "name": "besales_scheduled_task_list",
7819
8742
  "description": "Read-only список плановых задач канала (модуль «Задачи»). Единственный тип — DIALOGUE_ANALYSIS (суфлёр: саммари дня + почасовой «Статус коммуникации»). Scope: mcp:platform-setup.",
@@ -7881,6 +8804,16 @@
7881
8804
  "hidden"
7882
8805
  ],
7883
8806
  "description": "note — заметка в таймлайн CRM (безопасно). hidden — скрытое сообщение в открытой линии (клиент не видит; на живом портале НЕ проверено)."
8807
+ },
8808
+ "model": {
8809
+ "type": "string",
8810
+ "minLength": 1,
8811
+ "description": "Модель разбора этого режима. Пусто → общая."
8812
+ },
8813
+ "max_tokens": {
8814
+ "type": "integer",
8815
+ "minimum": 1,
8816
+ "description": "Лимит токенов этого режима. Пусто → общий."
7884
8817
  }
7885
8818
  },
7886
8819
  "description": "Саммари дня. Пишется ПОСЛЕ summary_time по локальному времени канала.",
@@ -7924,7 +8857,7 @@
7924
8857
  "min_new_events": {
7925
8858
  "type": "integer",
7926
8859
  "minimum": 1,
7927
- "description": "Порог новых событий: не набрано — разбор не запускается и заметка не пишется."
8860
+ "description": "Порог новых событий: не набрано — разбор не запускается. Независимо от порога разбор идёт только при наличии реплики клиента в окне."
7928
8861
  },
7929
8862
  "output": {
7930
8863
  "type": "string",
@@ -7933,6 +8866,16 @@
7933
8866
  "hidden"
7934
8867
  ],
7935
8868
  "description": "note — заметка в таймлайн CRM (безопасно). hidden — скрытое сообщение в открытой линии (клиент не видит; на живом портале НЕ проверено)."
8869
+ },
8870
+ "model": {
8871
+ "type": "string",
8872
+ "minLength": 1,
8873
+ "description": "Модель разбора этого режима. Пусто → общая."
8874
+ },
8875
+ "max_tokens": {
8876
+ "type": "integer",
8877
+ "minimum": 1,
8878
+ "description": "Лимит токенов этого режима. Пусто → общий."
7936
8879
  }
7937
8880
  },
7938
8881
  "description": "«Статус коммуникации» — раз в час внутри рабочего окна и только при новых сообщениях.",
@@ -7960,7 +8903,7 @@
7960
8903
  "type": "string",
7961
8904
  "minLength": 1
7962
8905
  },
7963
- "description": "ID воронок CRM. Пусто = без фильтра."
8906
+ "description": "ID воронок CRM. Разбираются ТОЛЬКО перечисленные. Пусто = не выбрано (включённая задача вернёт 400), а НЕ «все»."
7964
8907
  },
7965
8908
  "managers": {
7966
8909
  "type": "array",
@@ -7968,7 +8911,40 @@
7968
8911
  "type": "integer",
7969
8912
  "minimum": 1
7970
8913
  },
7971
- "description": "ASSIGNED_BY_ID ответственных Bitrix (не наши id — бери из besales_crm_operator_list). Пусто = без фильтра."
8914
+ "description": "ASSIGNED_BY_ID ответственных Bitrix (не наши id — бери из besales_crm_operator_list). Разбираются ТОЛЬКО перечисленные. Пусто = не выбрано (включённая задача вернёт 400), а НЕ «все»."
8915
+ },
8916
+ "stages": {
8917
+ "type": [
8918
+ "array",
8919
+ "null"
8920
+ ],
8921
+ "items": {
8922
+ "type": "object",
8923
+ "additionalProperties": false,
8924
+ "required": [
8925
+ "pipeline_crm_id",
8926
+ "pipeline_id",
8927
+ "status_id"
8928
+ ],
8929
+ "properties": {
8930
+ "pipeline_crm_id": {
8931
+ "type": "string",
8932
+ "format": "uuid",
8933
+ "description": "UUID CRM-интеграции."
8934
+ },
8935
+ "pipeline_id": {
8936
+ "type": "integer",
8937
+ "minimum": 0,
8938
+ "description": "Числовой id воронки CRM."
8939
+ },
8940
+ "status_id": {
8941
+ "type": "integer",
8942
+ "minimum": 0,
8943
+ "description": "Номер колонки внутри воронки."
8944
+ }
8945
+ }
8946
+ },
8947
+ "description": "Колонки ВНУТРИ выбранных воронок, общие для обоих режимов. Семантика пустоты ОБРАТНАЯ воронкам: ключа нет или null — все колонки выбранных воронок, воронка без выбранных колонок идёт целиком. ПУСТОЙ массив у включённой задачи вернёт 400. Стадия — тройка: номер колонки уникален лишь внутри пары (CRM, воронка)."
7972
8948
  },
7973
8949
  "daily_prompt": {
7974
8950
  "type": [
@@ -7976,7 +8952,7 @@
7976
8952
  "null"
7977
8953
  ],
7978
8954
  "minLength": 1,
7979
- "description": "Переопределение системного промпта саммари дня. Пусто = встроенный (написан под «ткани/производство»). null — СНЯТЬ переопределение (вернуть встроенный промпт)."
8955
+ "description": "Переопределение системного промпта саммари дня. Пусто = встроенный: он доменно-нейтрален, но состав срезов из кейса Lavsit. null — СНЯТЬ переопределение (вернуть встроенный промпт)."
7980
8956
  },
7981
8957
  "hourly_prompt": {
7982
8958
  "type": [
@@ -7992,6 +8968,296 @@
7992
8968
  }
7993
8969
  }
7994
8970
  }
8971
+ },
8972
+ {
8973
+ "name": "besales_broadcast_mailing_variant_list",
8974
+ "description": "Список именованных «Вариантов рассылки» workspace. Активные варианты выбираются для GetCourse-волн; архивные доступны для истории.",
8975
+ "inputSchema": {
8976
+ "type": "object",
8977
+ "required": [],
8978
+ "additionalProperties": false,
8979
+ "properties": {
8980
+ "workspace_id": {
8981
+ "type": "string",
8982
+ "format": "uuid",
8983
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
8984
+ },
8985
+ "include_archived": {
8986
+ "type": "boolean",
8987
+ "description": "Включить архивные варианты для чтения исторических конфигураций."
8988
+ }
8989
+ }
8990
+ }
8991
+ },
8992
+ {
8993
+ "name": "besales_broadcast_mailing_variant_create",
8994
+ "description": "Создать или восстановить именованный «Вариант рассылки» с описанием гипотезы, сообщений и GetCourse-процесса.",
8995
+ "inputSchema": {
8996
+ "type": "object",
8997
+ "required": [
8998
+ "name"
8999
+ ],
9000
+ "additionalProperties": false,
9001
+ "properties": {
9002
+ "workspace_id": {
9003
+ "type": "string",
9004
+ "format": "uuid",
9005
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
9006
+ },
9007
+ "name": {
9008
+ "type": "string",
9009
+ "minLength": 1,
9010
+ "maxLength": 200
9011
+ },
9012
+ "description": {
9013
+ "type": "string",
9014
+ "maxLength": 4000
9015
+ }
9016
+ }
9017
+ }
9018
+ },
9019
+ {
9020
+ "name": "besales_broadcast_mailing_variant_update",
9021
+ "description": "Изменить название, описание или архивный статус «Варианта рассылки».",
9022
+ "inputSchema": {
9023
+ "type": "object",
9024
+ "required": [
9025
+ "mailing_variant_id"
9026
+ ],
9027
+ "additionalProperties": false,
9028
+ "properties": {
9029
+ "workspace_id": {
9030
+ "type": "string",
9031
+ "format": "uuid",
9032
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
9033
+ },
9034
+ "mailing_variant_id": {
9035
+ "type": "string",
9036
+ "format": "uuid"
9037
+ },
9038
+ "name": {
9039
+ "type": "string",
9040
+ "minLength": 1,
9041
+ "maxLength": 200
9042
+ },
9043
+ "description": {
9044
+ "type": [
9045
+ "string",
9046
+ "null"
9047
+ ],
9048
+ "maxLength": 4000
9049
+ },
9050
+ "archived": {
9051
+ "type": "boolean"
9052
+ },
9053
+ "explicit_confirmation": {
9054
+ "type": "boolean",
9055
+ "const": true,
9056
+ "description": "Обязательно true при archived=true после явного подтверждения пользователя."
9057
+ }
9058
+ },
9059
+ "if": {
9060
+ "properties": {
9061
+ "archived": {
9062
+ "const": true
9063
+ }
9064
+ },
9065
+ "required": [
9066
+ "archived"
9067
+ ]
9068
+ },
9069
+ "then": {
9070
+ "required": [
9071
+ "explicit_confirmation"
9072
+ ]
9073
+ }
9074
+ }
9075
+ },
9076
+ {
9077
+ "name": "besales_broadcast_mailing_variant_delete",
9078
+ "description": "Архивировать «Вариант рассылки», сохранив историческую аналитику и ссылки отложенных durable-run.",
9079
+ "inputSchema": {
9080
+ "type": "object",
9081
+ "required": [
9082
+ "mailing_variant_id",
9083
+ "explicit_confirmation"
9084
+ ],
9085
+ "additionalProperties": false,
9086
+ "properties": {
9087
+ "workspace_id": {
9088
+ "type": "string",
9089
+ "format": "uuid",
9090
+ "description": "Optional override. Normally omit — defaults to the workspace bound to this session."
9091
+ },
9092
+ "mailing_variant_id": {
9093
+ "type": "string",
9094
+ "format": "uuid"
9095
+ },
9096
+ "explicit_confirmation": {
9097
+ "type": "boolean",
9098
+ "const": true,
9099
+ "description": "Обязательно true после явного подтверждения пользователя."
9100
+ }
9101
+ }
9102
+ }
9103
+ },
9104
+ {
9105
+ "name": "besales_dialogue_audit_config_get",
9106
+ "description": "Read-only настройки «Ревизора диалогов» на канале: включён ли плановый разбор, модель, час запуска, инструкции. isConfigured=false — строки конфига ещё нет, значения дефолтные. Запись настроек через MCP не выведена. Scope: read:analytics.",
9107
+ "inputSchema": {
9108
+ "type": "object",
9109
+ "required": [
9110
+ "platform_id"
9111
+ ],
9112
+ "additionalProperties": false,
9113
+ "properties": {
9114
+ "platform_id": {
9115
+ "type": "string",
9116
+ "format": "uuid",
9117
+ "description": "Канал, для которого настроен ревизор."
9118
+ }
9119
+ }
9120
+ }
9121
+ },
9122
+ {
9123
+ "name": "besales_dialogue_audit_runs_list",
9124
+ "description": "История прогонов ревизора на канале, курсорная пагинация (offset показал бы один прогон дважды). Scope: read:analytics.",
9125
+ "inputSchema": {
9126
+ "type": "object",
9127
+ "required": [
9128
+ "platform_id"
9129
+ ],
9130
+ "additionalProperties": false,
9131
+ "properties": {
9132
+ "platform_id": {
9133
+ "type": "string",
9134
+ "format": "uuid",
9135
+ "description": "Канал."
9136
+ },
9137
+ "cursor": {
9138
+ "type": "string",
9139
+ "description": "nextCursor предыдущей страницы."
9140
+ },
9141
+ "limit": {
9142
+ "type": "integer",
9143
+ "minimum": 1,
9144
+ "maximum": 100,
9145
+ "description": "Размер страницы."
9146
+ }
9147
+ }
9148
+ }
9149
+ },
9150
+ {
9151
+ "name": "besales_dialogue_audit_run_get",
9152
+ "description": "Отчёт прогона: статус, счётчики охвата (candidate/audited/failed segments), сводка, причина обрыва. Счётчики зафиксированы и не пересчитываются. Scope: read:analytics.",
9153
+ "inputSchema": {
9154
+ "type": "object",
9155
+ "required": [
9156
+ "run_id"
9157
+ ],
9158
+ "additionalProperties": false,
9159
+ "properties": {
9160
+ "run_id": {
9161
+ "type": "string",
9162
+ "format": "uuid",
9163
+ "description": "Прогон ревизора."
9164
+ }
9165
+ }
9166
+ }
9167
+ },
9168
+ {
9169
+ "name": "besales_dialogue_audit_findings",
9170
+ "description": "Находки прогона — материал для правки промпта. Фильтры: агент, категория, важность, статус разметки человеком (NEW/LIKED/DISLIKED). truncated=true означает обрезанный список. Разметка находок через MCP НЕ выведена: это человеческая оценка работы ревизора. Scope: read:analytics.",
9171
+ "inputSchema": {
9172
+ "type": "object",
9173
+ "required": [
9174
+ "run_id"
9175
+ ],
9176
+ "additionalProperties": false,
9177
+ "properties": {
9178
+ "run_id": {
9179
+ "type": "string",
9180
+ "format": "uuid",
9181
+ "description": "Прогон ревизора."
9182
+ },
9183
+ "agent_id": {
9184
+ "type": "string",
9185
+ "format": "uuid",
9186
+ "description": "Оставить находки одного агента."
9187
+ },
9188
+ "category": {
9189
+ "type": "string",
9190
+ "description": "Категория находки."
9191
+ },
9192
+ "severity": {
9193
+ "type": "string",
9194
+ "description": "Важность находки."
9195
+ },
9196
+ "status": {
9197
+ "type": "string",
9198
+ "enum": [
9199
+ "NEW",
9200
+ "LIKED",
9201
+ "DISLIKED"
9202
+ ],
9203
+ "description": "Разметка человеком. LIKED — ревизор прав, DISLIKED — человек находку отверг (применять её нельзя)."
9204
+ }
9205
+ }
9206
+ }
9207
+ },
9208
+ {
9209
+ "name": "besales_dialogue_audit_run_start",
9210
+ "description": "Запустить разбор сейчас. Durable: ответ приходит сразу с runId, работа идёт в очереди. Уже разобранное заново не оплачивается. 409 — на канале уже идёт прогон. Scope: mcp:platform-setup.",
9211
+ "inputSchema": {
9212
+ "type": "object",
9213
+ "required": [
9214
+ "platform_id"
9215
+ ],
9216
+ "additionalProperties": false,
9217
+ "properties": {
9218
+ "platform_id": {
9219
+ "type": "string",
9220
+ "format": "uuid",
9221
+ "description": "Канал."
9222
+ },
9223
+ "period_from": {
9224
+ "type": "string",
9225
+ "format": "date-time",
9226
+ "description": "Начало периода. Задаётся ВМЕСТЕ с period_to; без них — всё непроверенное."
9227
+ },
9228
+ "period_to": {
9229
+ "type": "string",
9230
+ "format": "date-time",
9231
+ "description": "Конец периода."
9232
+ },
9233
+ "explicit_confirmation": {
9234
+ "type": "boolean",
9235
+ "description": "Обязательно true. Операция тратит (или прерывает уже оплаченную) работу LLM клиента — подтверждается оператором явно."
9236
+ }
9237
+ }
9238
+ }
9239
+ },
9240
+ {
9241
+ "name": "besales_dialogue_audit_run_cancel",
9242
+ "description": "Остановить прогон. Переходит в CANCELLED (это не ошибка), захваченные отрезки возвращаются в пул, недоразобранное подхватит следующий прогон. Scope: mcp:platform-setup.",
9243
+ "inputSchema": {
9244
+ "type": "object",
9245
+ "required": [
9246
+ "run_id"
9247
+ ],
9248
+ "additionalProperties": false,
9249
+ "properties": {
9250
+ "run_id": {
9251
+ "type": "string",
9252
+ "format": "uuid",
9253
+ "description": "Прогон ревизора."
9254
+ },
9255
+ "explicit_confirmation": {
9256
+ "type": "boolean",
9257
+ "description": "Обязательно true. Операция тратит (или прерывает уже оплаченную) работу LLM клиента — подтверждается оператором явно."
9258
+ }
9259
+ }
9260
+ }
7995
9261
  }
7996
9262
  ],
7997
9263
  "resources": [
@@ -8183,7 +9449,7 @@
8183
9449
  }
8184
9450
  ],
8185
9451
  "summary": {
8186
- "total_tools": 160,
9452
+ "total_tools": 177,
8187
9453
  "tools_by_category": {
8188
9454
  "getcourse_wave": 10,
8189
9455
  "files_upload": 3,
@@ -8206,7 +9472,7 @@
8206
9472
  "feedback_sheets": 5,
8207
9473
  "facts_management": 2,
8208
9474
  "prompt_lint_standalone": 1,
8209
- "prompt_drafts": 5,
9475
+ "prompt_drafts": 7,
8210
9476
  "workbook_ingestion": 3,
8211
9477
  "knowledge_spaces": 6,
8212
9478
  "knowledge_documents": 4,
@@ -8221,7 +9487,8 @@
8221
9487
  "dialog_script": 2,
8222
9488
  "broadcast_analytics": 2,
8223
9489
  "scheduled_tasks": 2,
8224
- "follow_up_read": 2
9490
+ "follow_up_read": 3,
9491
+ "dialogue_audit": 6
8225
9492
  },
8226
9493
  "external_execution_pairs": [
8227
9494
  "besales_icp_analysis_get_instructions / submit",
@@ -8257,6 +9524,7 @@
8257
9524
  "besales_trigger_upsert",
8258
9525
  "besales_behavior_update",
8259
9526
  "besales_followup_sequence_upsert",
9527
+ "besales_followup_sequence_clone",
8260
9528
  "besales_pipeline_settings_update",
8261
9529
  "besales_platform_settings_update",
8262
9530
  "besales_audit_revert"
@@ -8409,6 +9677,9 @@
8409
9677
  "besales_setup_session_create",
8410
9678
  "besales_setup_session_get",
8411
9679
  "besales_setup_step_submit_output"
9680
+ ],
9681
+ "newly_added_in_followup_reactions": [
9682
+ "besales_followup_reactions"
8412
9683
  ]
8413
9684
  }
8414
9685
  }