@besales/mcp 0.1.0 → 0.11.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.
- package/README.md +272 -17
- package/dist/auth/connection-store.d.ts +58 -0
- package/dist/auth/connection-store.js +208 -0
- package/dist/auth/connection-store.js.map +1 -0
- package/dist/auth/oauth-client.d.ts +27 -2
- package/dist/auth/oauth-client.js +62 -11
- package/dist/auth/oauth-client.js.map +1 -1
- package/dist/auth/session-workspace.d.ts +2 -0
- package/dist/auth/session-workspace.js +20 -0
- package/dist/auth/session-workspace.js.map +1 -0
- package/dist/auth/token-storage.d.ts +19 -5
- package/dist/auth/token-storage.js +11 -6
- package/dist/auth/token-storage.js.map +1 -1
- package/dist/cli.d.ts +2 -7
- package/dist/cli.js +111 -33
- package/dist/cli.js.map +1 -1
- package/dist/http/api-client.d.ts +4 -13
- package/dist/http/api-client.js +18 -18
- package/dist/http/api-client.js.map +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/instructions/server-instructions.d.ts +15 -0
- package/dist/instructions/server-instructions.js +243 -0
- package/dist/instructions/server-instructions.js.map +1 -0
- package/dist/package-metadata.js +7 -1
- package/dist/package-metadata.js.map +1 -1
- package/dist/resources/concepts/feedback-sheets.md +77 -0
- package/dist/resources/concepts/sandbox.md +13 -0
- package/dist/resources/concepts/workbook-classification.md +241 -0
- package/dist/resources/docs/agent-behavior.md +393 -0
- package/dist/resources/docs/crm-integration.md +535 -0
- package/dist/resources/docs/files-and-uploads.md +295 -0
- package/dist/resources/docs/knowledge-base.md +521 -0
- package/dist/resources/docs/pipeline-builder.md +221 -0
- package/dist/resources/docs/pipeline-settings-deep.md +221 -0
- package/dist/resources/docs/platforms.md +513 -0
- package/dist/resources/docs/prompt-anatomy.md +298 -0
- package/dist/resources/docs/prompt-principles.md +289 -0
- package/dist/resources/registry.js +34 -12
- package/dist/resources/registry.js.map +1 -1
- package/dist/resources/workflows/compare-models.md +46 -0
- package/dist/resources/workflows/connect-crm-from-scratch.md +89 -0
- package/dist/resources/workflows/connect-datasource-from-scratch.md +92 -0
- package/dist/resources/workflows/extract-from-document.md +36 -0
- package/dist/resources/workflows/iterate-with-sandbox.md +31 -0
- package/dist/resources/workflows/platform-setup-from-scratch.md +113 -0
- package/dist/resources/workflows/production-readiness-check.md +41 -0
- package/dist/schemas/mcp-tools.json +2636 -182
- package/dist/server.js +2 -0
- package/dist/server.js.map +1 -1
- package/dist/tools/definitions/agent-design.d.ts +215 -0
- package/dist/tools/definitions/agent-design.js +643 -0
- package/dist/tools/definitions/agent-design.js.map +1 -0
- package/dist/tools/definitions/crm-platform.d.ts +211 -0
- package/dist/tools/definitions/crm-platform.js +1070 -0
- package/dist/tools/definitions/crm-platform.js.map +1 -0
- package/dist/tools/definitions/datasource.d.ts +40 -0
- package/dist/tools/definitions/datasource.js +196 -0
- package/dist/tools/definitions/datasource.js.map +1 -0
- package/dist/tools/definitions/knowledge.d.ts +215 -0
- package/dist/tools/definitions/knowledge.js +782 -0
- package/dist/tools/definitions/knowledge.js.map +1 -0
- package/dist/tools/definitions/model-comparison.d.ts +25 -0
- package/dist/tools/definitions/model-comparison.js +101 -0
- package/dist/tools/definitions/model-comparison.js.map +1 -0
- package/dist/tools/definitions/platform-setup.d.ts +412 -0
- package/dist/tools/definitions/platform-setup.js +738 -0
- package/dist/tools/definitions/platform-setup.js.map +1 -0
- package/dist/tools/definitions/session.d.ts +11 -0
- package/dist/tools/definitions/session.js +86 -0
- package/dist/tools/definitions/session.js.map +1 -0
- package/dist/tools/definitions/shared.d.ts +742 -0
- package/dist/tools/definitions/shared.js +773 -0
- package/dist/tools/definitions/shared.js.map +1 -0
- package/dist/tools/definitions.d.ts +873 -88
- package/dist/tools/definitions.js +14 -856
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/registry.d.ts +3 -1
- package/dist/tools/registry.js +90 -11
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/result.d.ts +1 -1
- package/dist/tools/result.js +12 -4
- package/dist/tools/result.js.map +1 -1
- package/dist/utils/logger.js +2 -1
- package/dist/utils/logger.js.map +1 -1
- package/docs/host-setup.md +34 -15
- package/package.json +2 -2
- package/scripts/install-claude-desktop.js +89 -11
- package/scripts/mock-api-server.js +1 -1
- package/scripts/mock-credentials.js +49 -6
- package/dist/types/api-contract.gen.d.ts +0 -6975
- package/dist/types/api-contract.gen.js +0 -6
- package/dist/types/api-contract.gen.js.map +0 -1
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"workspace_id": {
|
|
25
25
|
"type": "string",
|
|
26
26
|
"format": "uuid",
|
|
27
|
-
"description": "Optional override.
|
|
27
|
+
"description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)."
|
|
28
28
|
},
|
|
29
29
|
"name": {
|
|
30
30
|
"type": "string"
|
|
@@ -37,8 +37,7 @@
|
|
|
37
37
|
"enum": [
|
|
38
38
|
"from_dialogues",
|
|
39
39
|
"from_files",
|
|
40
|
-
"from_scratch"
|
|
41
|
-
"ai_generated"
|
|
40
|
+
"from_scratch"
|
|
42
41
|
],
|
|
43
42
|
"default": "from_scratch"
|
|
44
43
|
}
|
|
@@ -47,54 +46,61 @@
|
|
|
47
46
|
},
|
|
48
47
|
{
|
|
49
48
|
"name": "besales_icp_import_dialogues",
|
|
50
|
-
"description": "
|
|
49
|
+
"description": "Импорт диалогов для ICP. Два режима. mode='text' (legacy CRM history): использует crm_connection_id + outcome_filter + days_ago, требует gdpr_confirmed. mode='audio' (Phase 4 — записи звонков → Yandex SpeechKit STT v3 → IcpDialogueSample): использует audio_source_type + audio_source_config (amocrm_leads → {crmConnectionId, leadIds[]}; xlsx_upload → {storedFileId}, xlsx загрузи через POST /v2/files; onlinepbx_direct → {startDate, endDate, matchToCrm?, dryRun?} — звонки onlinePBX за период). outcome_filter/days_ago/crm_connection_id игнорируются в audio-режиме. Audio async — возвращает runId, опрашивай besales_icp_import_status.",
|
|
51
50
|
"inputSchema": {
|
|
52
51
|
"type": "object",
|
|
53
|
-
"required": [
|
|
54
|
-
"icp_id",
|
|
55
|
-
"crm_connection_id",
|
|
56
|
-
"gdpr_confirmed"
|
|
57
|
-
],
|
|
52
|
+
"required": ["icp_id"],
|
|
58
53
|
"properties": {
|
|
59
|
-
"icp_id": {
|
|
54
|
+
"icp_id": { "type": "string", "format": "uuid" },
|
|
55
|
+
"mode": {
|
|
60
56
|
"type": "string",
|
|
61
|
-
"
|
|
57
|
+
"enum": ["text", "audio"],
|
|
58
|
+
"default": "text",
|
|
59
|
+
"description": "text — legacy импорт сохранённых диалогов; audio — Phase 4 batch транскрипция звонков"
|
|
62
60
|
},
|
|
63
61
|
"crm_connection_id": {
|
|
64
62
|
"type": "string",
|
|
65
|
-
"format": "uuid"
|
|
63
|
+
"format": "uuid",
|
|
64
|
+
"description": "Обязателен при mode=text"
|
|
66
65
|
},
|
|
67
66
|
"outcome_filter": {
|
|
68
67
|
"type": "array",
|
|
69
|
-
"items": {
|
|
70
|
-
|
|
71
|
-
"enum": [
|
|
72
|
-
"won",
|
|
73
|
-
"lost",
|
|
74
|
-
"in_progress"
|
|
75
|
-
]
|
|
76
|
-
},
|
|
77
|
-
"default": [
|
|
78
|
-
"won",
|
|
79
|
-
"lost"
|
|
80
|
-
]
|
|
68
|
+
"items": { "type": "string", "enum": ["won", "lost", "in_progress"] },
|
|
69
|
+
"default": ["won", "lost"]
|
|
81
70
|
},
|
|
82
|
-
"days_ago": {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"maximum": 730,
|
|
86
|
-
"default": 180
|
|
87
|
-
},
|
|
88
|
-
"anonymize": {
|
|
71
|
+
"days_ago": { "type": "integer", "minimum": 1, "maximum": 730, "default": 180 },
|
|
72
|
+
"anonymize": { "type": "boolean", "default": true },
|
|
73
|
+
"gdpr_confirmed": {
|
|
89
74
|
"type": "boolean",
|
|
90
|
-
"
|
|
75
|
+
"description": "Обязателен при mode=text"
|
|
91
76
|
},
|
|
92
|
-
"
|
|
93
|
-
"type": "
|
|
77
|
+
"audio_source_type": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"enum": ["amocrm_leads", "xlsx_upload", "onlinepbx_direct", "bitrix_openlines"],
|
|
80
|
+
"description": "Обязателен при mode=audio. amocrm_leads → audio_source_config.leadIds[]; xlsx_upload → audio_source_config.storedFileId; onlinepbx_direct → audio_source_config {startDate, endDate, minDurationSec?, direction?, matchToCrm?, crmConnectionId?, defaultOutcome?, dryRun?, trunkId?}; bitrix_openlines → audio_source_config {crmConnectionId, startDate, endDate, categoryId?, dryRun?} (текстовые диалоги Bitrix open-lines за период). xlsx_drive (Google Drive) НЕ поддерживается бэкендом (→ 400)."
|
|
81
|
+
},
|
|
82
|
+
"audio_source_config": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"description": "Shape зависит от audio_source_type (amocrm_leads / xlsx_upload / onlinepbx_direct / bitrix_openlines)"
|
|
85
|
+
},
|
|
86
|
+
"language": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"enum": ["ru-RU", "uz-UZ", "kk-KZ", "auto"]
|
|
94
89
|
}
|
|
95
90
|
}
|
|
96
91
|
}
|
|
97
92
|
},
|
|
93
|
+
{
|
|
94
|
+
"name": "besales_icp_import_status",
|
|
95
|
+
"description": "Получить статус audio-import run для ICP (Phase 4). Возвращает aggregated counters + terminal status + failedItems[] (errorCode/errorMessage/linkExpiredReason/sourceRef по упавшим и протухшим items, до 50 шт.). При status=PARTIAL/FAILED смотри failedItems — там причины (напр. expired-ссылка, TLS/cert, Access Denied), не нужен доступ к БД.",
|
|
96
|
+
"inputSchema": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"required": ["run_id"],
|
|
99
|
+
"properties": {
|
|
100
|
+
"run_id": { "type": "string", "format": "uuid" }
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
98
104
|
{
|
|
99
105
|
"name": "besales_icp_analysis_get_instructions",
|
|
100
106
|
"description": "⭐ EXTERNAL EXECUTION — получить 3-stage instructions для ICP segments + personas analysis. Claude локально: 1) segment_clustering, 2) classification, 3) persona_generation. После — submit через besales_icp_analysis_submit. Этот flow дешевле и качественнее чем internal proxy через prompt-services с gpt-4o-mini.",
|
|
@@ -107,7 +113,7 @@
|
|
|
107
113
|
"workspace_id": {
|
|
108
114
|
"type": "string",
|
|
109
115
|
"format": "uuid",
|
|
110
|
-
"description": "Optional override.
|
|
116
|
+
"description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)."
|
|
111
117
|
},
|
|
112
118
|
"icp_profile_id": {
|
|
113
119
|
"type": "string",
|
|
@@ -150,7 +156,7 @@
|
|
|
150
156
|
"workspace_id": {
|
|
151
157
|
"type": "string",
|
|
152
158
|
"format": "uuid",
|
|
153
|
-
"description": "Optional override.
|
|
159
|
+
"description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)."
|
|
154
160
|
},
|
|
155
161
|
"operation_id": {
|
|
156
162
|
"type": "string",
|
|
@@ -236,9 +242,59 @@
|
|
|
236
242
|
}
|
|
237
243
|
}
|
|
238
244
|
},
|
|
245
|
+
{
|
|
246
|
+
"name": "besales_icp_list",
|
|
247
|
+
"description": "Список ICP-профилей воркспейса (id, name, isActive, segmentsCount, samplesCount). Read-only. Полную деталь профиля бери через besales_icp_get.",
|
|
248
|
+
"inputSchema": {
|
|
249
|
+
"type": "object",
|
|
250
|
+
"required": [],
|
|
251
|
+
"properties": {
|
|
252
|
+
"workspace_id": {
|
|
253
|
+
"type": "string",
|
|
254
|
+
"format": "uuid",
|
|
255
|
+
"description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)."
|
|
256
|
+
},
|
|
257
|
+
"limit": { "type": "integer", "minimum": 1, "maximum": 100 },
|
|
258
|
+
"cursor": { "type": "string" }
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"name": "besales_icp_get",
|
|
264
|
+
"description": "ICP profile detail: профиль + все сегменты (description/demographics/pains/motivations/languageStyle) + персоны + сводка последних диалог-сэмплов (recentSamples с их id). Read-only. Используй для сверки промпта/поведения агента с ICP. test-сценарии запрашивай отдельно через besales_icp_scenarios_list.",
|
|
265
|
+
"inputSchema": {
|
|
266
|
+
"type": "object",
|
|
267
|
+
"required": ["icp_id"],
|
|
268
|
+
"properties": {
|
|
269
|
+
"icp_id": { "type": "string", "format": "uuid" }
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "besales_icp_scenarios_list",
|
|
275
|
+
"description": "Список test-сценариев ICP-профиля (name, segmentIds, situations). Read-only. Сценарии НЕ входят в besales_icp_get — запрашивай отдельно.",
|
|
276
|
+
"inputSchema": {
|
|
277
|
+
"type": "object",
|
|
278
|
+
"required": ["icp_id"],
|
|
279
|
+
"properties": {
|
|
280
|
+
"icp_id": { "type": "string", "format": "uuid" }
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"name": "besales_icp_sample_messages",
|
|
286
|
+
"description": "Сообщения одного диалог-сэмпла ICP (тексты реплик client/agent). Read-only. sample_id бери из recentSamples в ответе besales_icp_get.",
|
|
287
|
+
"inputSchema": {
|
|
288
|
+
"type": "object",
|
|
289
|
+
"required": ["sample_id"],
|
|
290
|
+
"properties": {
|
|
291
|
+
"sample_id": { "type": "string", "format": "uuid" }
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
},
|
|
239
295
|
{
|
|
240
296
|
"name": "besales_prompt_generate_get_instructions",
|
|
241
|
-
"description": "⭐ EXTERNAL EXECUTION — получить 4-stage instructions для prompt generation: 1) structure_builder, 2) industry_validator, 3) prompt_tester, 4) finalizer. Claude локально выполняет каждую stage с Sonnet/Opus используя returned system prompts + JSON schemas. После — submit через besales_prompt_generate_submit.",
|
|
297
|
+
"description": "⭐ EXTERNAL EXECUTION — получить 4-stage instructions для prompt generation: 1) structure_builder, 2) industry_validator, 3) prompt_tester, 4) finalizer. Claude локально выполняет каждую stage с Sonnet/Opus используя returned system prompts + JSON schemas. После — submit через besales_prompt_generate_submit. Перед запуском уточни у пользователя направление сообщений — INBOUND (клиент пишет первым) или OUTBOUND (агент инициирует контакт), и передай выбор в `style_hints.message_direction`. Если есть любые сомнения — обязательно спроси, не угадывай: направление меняет принципы общения, запреты и чеклист во всех 4 stages. ВАЖНО: style_hints.language (ru/en) — это язык рассуждения стадий генерации, НЕ язык итогового промпта. Язык бота определяется тем, что ты пишешь в final_content при submit — для узбекского/казахского и т.д. бота просто пиши промпт на этом языке в final_content, оставив language=ru или en.",
|
|
242
298
|
"inputSchema": {
|
|
243
299
|
"type": "object",
|
|
244
300
|
"required": [
|
|
@@ -277,7 +333,17 @@
|
|
|
277
333
|
},
|
|
278
334
|
"language": {
|
|
279
335
|
"type": "string",
|
|
280
|
-
"
|
|
336
|
+
"enum": ["ru", "en"],
|
|
337
|
+
"default": "ru",
|
|
338
|
+
"description": "Язык РАССУЖДЕНИЯ стадий генерации (ru/en) — НЕ язык итогового промпта. Язык самого промпта = то, что ты напишешь в final_content (узбекский, казахский и т.д.) независимо от этого поля."
|
|
339
|
+
},
|
|
340
|
+
"message_direction": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"enum": [
|
|
343
|
+
"INBOUND",
|
|
344
|
+
"OUTBOUND"
|
|
345
|
+
],
|
|
346
|
+
"description": "INBOUND — клиент пишет первым (агент отвечает); OUTBOUND — агент инициирует контакт. Обязательно уточни у пользователя перед запуском, особенно если есть сомнения — влияет на принципы общения, запреты и чеклист во всех 4 stages."
|
|
281
347
|
}
|
|
282
348
|
}
|
|
283
349
|
}
|
|
@@ -346,98 +412,6 @@
|
|
|
346
412
|
}
|
|
347
413
|
}
|
|
348
414
|
},
|
|
349
|
-
{
|
|
350
|
-
"name": "besales_prompt_iterate_get_instructions",
|
|
351
|
-
"description": "⭐ EXTERNAL EXECUTION — 2-stage instructions для iteration: 1) iteration_analysis (analyze user feedback), 2) iteration_recommendation (propose changes).",
|
|
352
|
-
"inputSchema": {
|
|
353
|
-
"type": "object",
|
|
354
|
-
"required": [
|
|
355
|
-
"agent_id",
|
|
356
|
-
"base_version_id",
|
|
357
|
-
"feedback"
|
|
358
|
-
],
|
|
359
|
-
"properties": {
|
|
360
|
-
"agent_id": {
|
|
361
|
-
"type": "string",
|
|
362
|
-
"format": "uuid"
|
|
363
|
-
},
|
|
364
|
-
"base_version_id": {
|
|
365
|
-
"type": "string",
|
|
366
|
-
"format": "uuid"
|
|
367
|
-
},
|
|
368
|
-
"feedback": {
|
|
369
|
-
"type": "object",
|
|
370
|
-
"properties": {
|
|
371
|
-
"general_comments": {
|
|
372
|
-
"type": "string"
|
|
373
|
-
},
|
|
374
|
-
"selections": {
|
|
375
|
-
"type": "array",
|
|
376
|
-
"items": {
|
|
377
|
-
"type": "object"
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
"name": "besales_prompt_iterate_submit",
|
|
387
|
-
"description": "Submit готовый iteration result.",
|
|
388
|
-
"inputSchema": {
|
|
389
|
-
"type": "object",
|
|
390
|
-
"required": [
|
|
391
|
-
"agent_id",
|
|
392
|
-
"operation_id",
|
|
393
|
-
"stages",
|
|
394
|
-
"proposed_changes",
|
|
395
|
-
"preview_content"
|
|
396
|
-
],
|
|
397
|
-
"properties": {
|
|
398
|
-
"agent_id": {
|
|
399
|
-
"type": "string",
|
|
400
|
-
"format": "uuid"
|
|
401
|
-
},
|
|
402
|
-
"operation_id": {
|
|
403
|
-
"type": "string",
|
|
404
|
-
"format": "uuid"
|
|
405
|
-
},
|
|
406
|
-
"stages": {
|
|
407
|
-
"type": "array",
|
|
408
|
-
"minItems": 2,
|
|
409
|
-
"items": {
|
|
410
|
-
"type": "object",
|
|
411
|
-
"required": [
|
|
412
|
-
"name",
|
|
413
|
-
"output"
|
|
414
|
-
],
|
|
415
|
-
"properties": {
|
|
416
|
-
"name": {
|
|
417
|
-
"type": "string",
|
|
418
|
-
"enum": [
|
|
419
|
-
"iteration_analysis",
|
|
420
|
-
"iteration_recommendation"
|
|
421
|
-
]
|
|
422
|
-
},
|
|
423
|
-
"output": {
|
|
424
|
-
"type": "object"
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
},
|
|
429
|
-
"proposed_changes": {
|
|
430
|
-
"type": "array",
|
|
431
|
-
"items": {
|
|
432
|
-
"type": "object"
|
|
433
|
-
}
|
|
434
|
-
},
|
|
435
|
-
"preview_content": {
|
|
436
|
-
"type": "string"
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
},
|
|
441
415
|
{
|
|
442
416
|
"name": "besales_prompt_analyze_get_instructions",
|
|
443
417
|
"description": "⭐ EXTERNAL EXECUTION — 4-stage instructions для static analysis: 1) grammar, 2) industry, 3) structure, 4) aggregation. Returns system prompts + JSON schemas; Claude выполняет, submits aggregated issues.",
|
|
@@ -557,7 +531,7 @@
|
|
|
557
531
|
},
|
|
558
532
|
{
|
|
559
533
|
"name": "besales_sandbox_run_start",
|
|
560
|
-
"description": "Start sandbox run для agent (full multi-persona × multi-scenario testing). Queued async.",
|
|
534
|
+
"description": "Start sandbox run для agent (full multi-persona × multi-scenario testing). Queued async. Перед запуском уточни у пользователя: (1) mode — single_agent (тест одного агента изолированно, роутер не задействован) или workflow (полный прогон через роутер); (2) client_mode — scripted (реплики клиента из сценария, детерминированно), simulated (LLM отыгрывает персону вживую) или оба (= два прогона, по умолчанию предлагай оба).",
|
|
561
535
|
"inputSchema": {
|
|
562
536
|
"type": "object",
|
|
563
537
|
"required": [
|
|
@@ -578,6 +552,35 @@
|
|
|
578
552
|
"options": {
|
|
579
553
|
"type": "object",
|
|
580
554
|
"properties": {
|
|
555
|
+
"mode": {
|
|
556
|
+
"type": "string",
|
|
557
|
+
"enum": [
|
|
558
|
+
"single_agent",
|
|
559
|
+
"workflow"
|
|
560
|
+
],
|
|
561
|
+
"default": "single_agent",
|
|
562
|
+
"description": "single_agent — тест одного агента изолированно (роутер не задействован, даже если на платформе несколько агентов); workflow — полный прогон через роутер по всем REGULAR-агентам платформы."
|
|
563
|
+
},
|
|
564
|
+
"client_mode": {
|
|
565
|
+
"type": "string",
|
|
566
|
+
"enum": [
|
|
567
|
+
"scripted",
|
|
568
|
+
"simulated"
|
|
569
|
+
],
|
|
570
|
+
"default": "scripted",
|
|
571
|
+
"description": "scripted — реплики клиента из сценария проигрываются дословно (детерминированно); simulated — backend-LLM отыгрывает персону ICP и генерит реплики клиента вживую (адаптивно, недетерминированно). Один прогон = один режим."
|
|
572
|
+
},
|
|
573
|
+
"simulation": {
|
|
574
|
+
"type": "object",
|
|
575
|
+
"description": "Опции симуляции — применяются только при client_mode=simulated.",
|
|
576
|
+
"properties": {
|
|
577
|
+
"max_turns": {
|
|
578
|
+
"type": "integer",
|
|
579
|
+
"minimum": 1,
|
|
580
|
+
"maximum": 30
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
},
|
|
581
584
|
"check_routing": {
|
|
582
585
|
"type": "boolean",
|
|
583
586
|
"default": false
|
|
@@ -628,7 +631,7 @@
|
|
|
628
631
|
},
|
|
629
632
|
{
|
|
630
633
|
"name": "besales_sandbox_findings_submit",
|
|
631
|
-
"description": "Submit Claude-generated sandbox findings. Findings сохраняются как SandboxRunFeedback с status=SUBMITTED (improvement-lab consumes).",
|
|
634
|
+
"description": "Submit Claude-generated sandbox findings. Findings сохраняются как SandboxRunFeedback с status=SUBMITTED (improvement-lab consumes). ВАЖНО: category — строго из enum ЭТОЙ submit-схемы (hallucination/wrong_action/wrong_routing/missed_trigger/wrong_pipeline_transition/rag_miss/bad_tone/other); он РАСХОДИТСЯ с enum в besales_sandbox_findings_get_instructions (там есть missed_context). Категорию из get_instructions, которой здесь нет (например missed_context), маппь на other — иначе 400.",
|
|
632
635
|
"inputSchema": {
|
|
633
636
|
"type": "object",
|
|
634
637
|
"required": [
|
|
@@ -669,6 +672,7 @@
|
|
|
669
672
|
"enum": [
|
|
670
673
|
"hallucination",
|
|
671
674
|
"wrong_action",
|
|
675
|
+
"wrong_routing",
|
|
672
676
|
"missed_trigger",
|
|
673
677
|
"wrong_pipeline_transition",
|
|
674
678
|
"rag_miss",
|
|
@@ -727,7 +731,6 @@
|
|
|
727
731
|
"type": "object",
|
|
728
732
|
"required": [
|
|
729
733
|
"agent_id",
|
|
730
|
-
"simulation_id",
|
|
731
734
|
"operation_id",
|
|
732
735
|
"findings"
|
|
733
736
|
],
|
|
@@ -875,6 +878,144 @@
|
|
|
875
878
|
}
|
|
876
879
|
}
|
|
877
880
|
},
|
|
881
|
+
{
|
|
882
|
+
"name": "besales_test_scenario_generate_get_instructions",
|
|
883
|
+
"description": "Stage 1 of 2 (external execution). Returns scenario_builder system prompt + JSON schema + ICP context (segments + personas). Claude локально генерит sandbox-ready test scenarios, затем вызывает besales_test_scenario_generate_submit с operationId.",
|
|
884
|
+
"inputSchema": {
|
|
885
|
+
"type": "object",
|
|
886
|
+
"required": ["icp_profile_id"],
|
|
887
|
+
"properties": {
|
|
888
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
889
|
+
"icp_profile_id": { "type": "string", "format": "uuid" },
|
|
890
|
+
"count": { "type": "integer", "minimum": 1, "maximum": 20, "default": 5 },
|
|
891
|
+
"business_context": { "type": "object" }
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
"name": "besales_test_scenario_generate_submit",
|
|
897
|
+
"description": "Stage 2 of 2 (external execution). Submits сгенерированные test scenarios → bulk create в test_scenarios под указанным ICP profile. segmentIds должны ссылаться на existing segments. Каждый scenario.situations начинается с role='client'.",
|
|
898
|
+
"inputSchema": {
|
|
899
|
+
"type": "object",
|
|
900
|
+
"required": ["operation_id", "icp_profile_id", "scenarios"],
|
|
901
|
+
"properties": {
|
|
902
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
903
|
+
"operation_id": { "type": "string", "format": "uuid" },
|
|
904
|
+
"icp_profile_id": { "type": "string", "format": "uuid" },
|
|
905
|
+
"scenarios": {
|
|
906
|
+
"type": "array",
|
|
907
|
+
"minItems": 1,
|
|
908
|
+
"maxItems": 20,
|
|
909
|
+
"items": {
|
|
910
|
+
"type": "object",
|
|
911
|
+
"required": ["name", "situations"],
|
|
912
|
+
"properties": {
|
|
913
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
914
|
+
"description": { "type": "string", "maxLength": 1000 },
|
|
915
|
+
"segment_ids": {
|
|
916
|
+
"type": "array",
|
|
917
|
+
"items": { "type": "string", "format": "uuid" }
|
|
918
|
+
},
|
|
919
|
+
"situations": {
|
|
920
|
+
"type": "array",
|
|
921
|
+
"minItems": 1,
|
|
922
|
+
"items": {
|
|
923
|
+
"type": "object",
|
|
924
|
+
"required": ["role", "text"],
|
|
925
|
+
"properties": {
|
|
926
|
+
"role": { "type": "string", "enum": ["client", "agent"] },
|
|
927
|
+
"text": { "type": "string", "minLength": 1, "maxLength": 4000 }
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"name": "besales_dialog_script_get",
|
|
939
|
+
"description": "«Скрипт диалога» агента (структура: этапы → ветки с тегами + переходы) из хранимого поля dialogScript — ЕДИНСТВЕННЫЙ source of truth скрипта; §6 промпта рендерится из него. Read-only. Для legacy-агентов без поля — fallback на парс §6 из промпта. Возвращает { present, scriptGraph }.",
|
|
940
|
+
"inputSchema": {
|
|
941
|
+
"type": "object",
|
|
942
|
+
"required": ["agent_id"],
|
|
943
|
+
"properties": {
|
|
944
|
+
"agent_id": { "type": "string", "format": "uuid" }
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
"name": "besales_dialog_script_update",
|
|
950
|
+
"description": "Записать/поправить «Скрипт диалога» агента (dialogScript = source of truth). §6 промпта пересобирается из поля при СЛЕДУЮЩЕЙ генерации промпта (besales_prompt_generate) — скрипт и промпт генерятся отдельными шагами. graph: stages[{id,name}] + nodes[{id,stageId,title,instruction,leadStateTag?,branchId}] + edges[{from,to,condition?}].",
|
|
951
|
+
"inputSchema": {
|
|
952
|
+
"type": "object",
|
|
953
|
+
"required": ["agent_id", "graph"],
|
|
954
|
+
"properties": {
|
|
955
|
+
"agent_id": { "type": "string", "format": "uuid" },
|
|
956
|
+
"preamble": { "type": "string" },
|
|
957
|
+
"graph": {
|
|
958
|
+
"type": "object",
|
|
959
|
+
"required": ["stages", "nodes", "edges"],
|
|
960
|
+
"properties": {
|
|
961
|
+
"stages": {
|
|
962
|
+
"type": "array",
|
|
963
|
+
"items": {
|
|
964
|
+
"type": "object",
|
|
965
|
+
"required": ["id", "name"],
|
|
966
|
+
"properties": {
|
|
967
|
+
"id": { "type": "string" },
|
|
968
|
+
"name": { "type": "string" }
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
"nodes": {
|
|
973
|
+
"type": "array",
|
|
974
|
+
"items": {
|
|
975
|
+
"type": "object",
|
|
976
|
+
"required": ["id", "stageId", "title", "instruction", "branchId"],
|
|
977
|
+
"properties": {
|
|
978
|
+
"id": { "type": "string" },
|
|
979
|
+
"stageId": { "type": "string" },
|
|
980
|
+
"title": { "type": "string" },
|
|
981
|
+
"instruction": { "type": "string" },
|
|
982
|
+
"leadStateTag": { "type": ["string", "null"] },
|
|
983
|
+
"branchId": { "type": "string" }
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
},
|
|
987
|
+
"edges": {
|
|
988
|
+
"type": "array",
|
|
989
|
+
"items": {
|
|
990
|
+
"type": "object",
|
|
991
|
+
"required": ["from", "to"],
|
|
992
|
+
"properties": {
|
|
993
|
+
"from": { "type": "string" },
|
|
994
|
+
"to": { "type": "string" },
|
|
995
|
+
"condition": { "type": ["string", "null"] }
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"name": "besales_workspace_overview",
|
|
1006
|
+
"description": "Single-shot snapshot всего workspace: platforms (с agentsCount + isAiEnabled), ICP profiles (с segments/samples counts), feedback sheets, MCP connections summary. Используй ПЕРВЫМ когда user задаёт open-ended вопросы вида 'что у меня есть?' / 'покажи мою настройку' — заменяет N round-trips. После этого drill-down через besales_platform_context_get или besales_agent_list.",
|
|
1007
|
+
"inputSchema": {
|
|
1008
|
+
"type": "object",
|
|
1009
|
+
"required": [],
|
|
1010
|
+
"properties": {
|
|
1011
|
+
"workspace_id": {
|
|
1012
|
+
"type": "string",
|
|
1013
|
+
"format": "uuid",
|
|
1014
|
+
"description": "ID workspace (optional — auto-injected MCP сервером из активного workspace context, как у besales_icp_create)."
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
},
|
|
878
1019
|
{
|
|
879
1020
|
"name": "besales_platform_context_get",
|
|
880
1021
|
"description": "Get sanitized platform setup context first when user gives platformId. Returns platform, agents, router, triggers, behavior, follow-up, pipeline settings and readiness flags; never returns channel credentials or secrets.",
|
|
@@ -914,7 +1055,7 @@
|
|
|
914
1055
|
},
|
|
915
1056
|
{
|
|
916
1057
|
"name": "besales_agent_update",
|
|
917
|
-
"description": "Patch safe AgentChat metadata for an existing platform agent. Direct baseSystemPrompt edits are rejected; use PromptHub flow for prompt changes.",
|
|
1058
|
+
"description": "Patch safe AgentChat metadata + typed runtime/output config + knowledge spaces + agent scope for an existing platform agent. Direct baseSystemPrompt edits are rejected; use PromptHub flow for prompt changes.",
|
|
918
1059
|
"inputSchema": {
|
|
919
1060
|
"type": "object",
|
|
920
1061
|
"required": ["platform_id", "agent_id"],
|
|
@@ -926,7 +1067,56 @@
|
|
|
926
1067
|
"model_lane": { "type": "string", "enum": ["CHEAP", "STANDARD", "DEEP"] },
|
|
927
1068
|
"default_icp_profile_id": { "type": ["string", "null"], "format": "uuid" },
|
|
928
1069
|
"use_global_history": { "type": "boolean" },
|
|
929
|
-
"adapt_to_user_language": { "type": "boolean" }
|
|
1070
|
+
"adapt_to_user_language": { "type": "boolean" },
|
|
1071
|
+
"runtime_config": {
|
|
1072
|
+
"type": "object",
|
|
1073
|
+
"description": "v1.5 Increment 3 — runtime-level настройки (temperature, max_tokens, rag_top_k, reasoning_effort, ...).",
|
|
1074
|
+
"properties": {
|
|
1075
|
+
"temperature": { "type": "number", "minimum": 0, "maximum": 2 },
|
|
1076
|
+
"max_tokens": { "type": "integer", "minimum": 1 },
|
|
1077
|
+
"memory_history_size": { "type": "integer", "minimum": 1 },
|
|
1078
|
+
"rag_top_k": { "type": "integer", "minimum": 1, "maximum": 50 },
|
|
1079
|
+
"rag_min_score": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
1080
|
+
"qa_min_score": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
1081
|
+
"qa_context_limit": { "type": "integer", "minimum": 1, "maximum": 10 },
|
|
1082
|
+
"max_response_symbols": { "type": "integer", "minimum": 1 },
|
|
1083
|
+
"reasoning_effort": { "type": "string", "enum": ["minimal", "low", "medium", "high", "max"] },
|
|
1084
|
+
"verbosity": { "type": "string", "enum": ["low", "medium", "high"] },
|
|
1085
|
+
"enable_thinking": { "type": "boolean" },
|
|
1086
|
+
"timezone": { "type": "string" },
|
|
1087
|
+
"language_code": { "type": "string" },
|
|
1088
|
+
"summarize_every": { "type": "integer", "minimum": 1 },
|
|
1089
|
+
"summary_max_size": { "type": "integer", "minimum": 1 },
|
|
1090
|
+
"use_summary": { "type": "boolean" },
|
|
1091
|
+
"include_crm_fields_in_memory": { "type": "boolean" },
|
|
1092
|
+
"include_trigger_context": { "type": "boolean" }
|
|
1093
|
+
}
|
|
1094
|
+
},
|
|
1095
|
+
"output_config": {
|
|
1096
|
+
"type": "object",
|
|
1097
|
+
"description": "v1.5 Increment 3 — UI/output (displayName, button generator). self_analysis НЕ часть — DROPPED в v2 (Phase B, 2026-05-27); используй post_processors (Routing Studio Critic node).",
|
|
1098
|
+
"properties": {
|
|
1099
|
+
"display_name": { "type": "string" },
|
|
1100
|
+
"button_generator": {
|
|
1101
|
+
"type": "object",
|
|
1102
|
+
"properties": {
|
|
1103
|
+
"enabled": { "type": "boolean" },
|
|
1104
|
+
"max_buttons": { "type": "integer", "minimum": 1, "maximum": 10 },
|
|
1105
|
+
"keyboard_type": { "type": "string", "enum": ["INLINE", "REPLY"] },
|
|
1106
|
+
"dynamic": { "type": "boolean" }
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
},
|
|
1111
|
+
"knowledge_space_ids": {
|
|
1112
|
+
"type": "array",
|
|
1113
|
+
"items": { "type": "string", "format": "uuid" },
|
|
1114
|
+
"description": "Список Namespace.id (knowledge spaces), к которым подключён агент. Валидация: existence + workspace match + platform scope match."
|
|
1115
|
+
},
|
|
1116
|
+
"agent_scope": {
|
|
1117
|
+
"type": "string",
|
|
1118
|
+
"enum": ["sale", "reactivation", "support", "onboarding", "faq", "qualification", "complaint", "other"]
|
|
1119
|
+
}
|
|
930
1120
|
}
|
|
931
1121
|
}
|
|
932
1122
|
},
|
|
@@ -1025,75 +1215,2077 @@
|
|
|
1025
1215
|
},
|
|
1026
1216
|
{
|
|
1027
1217
|
"name": "besales_behavior_update",
|
|
1028
|
-
"description": "Patch allowlisted AgentBehavior fields for a platform. Operator/CRM-affecting behavior changes require explicit_confirmation.",
|
|
1029
|
-
"inputSchema": {
|
|
1030
|
-
"type": "object",
|
|
1031
|
-
"required": ["platform_id", "updates"],
|
|
1032
|
-
"properties": {
|
|
1033
|
-
"platform_id": { "type": "string", "format": "uuid" },
|
|
1034
|
-
"updates": { "type": "object" },
|
|
1035
|
-
"explicit_confirmation": { "type": "boolean" },
|
|
1036
|
-
"confirmation_reason": { "type": "string" }
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
},
|
|
1040
|
-
{
|
|
1041
|
-
"name": "besales_followup_sequence_upsert",
|
|
1042
|
-
"description": "Create or patch a follow-up sequence definition only. Runtime executions and scheduled messages are read-only; enabling requires explicit_confirmation.",
|
|
1218
|
+
"description": "Patch allowlisted AgentBehavior fields for a platform via typed sections (greeting, media_handling, url_handling, error_handling, operator_schedule, typing_behavior, message_filters, message_splitting, privacy). Phase B (2026-05-27): generic `updates` field удалён — отвергается с 400. Operator/CRM-affecting behavior changes require explicit_confirmation.",
|
|
1043
1219
|
"inputSchema": {
|
|
1044
1220
|
"type": "object",
|
|
1045
|
-
"
|
|
1221
|
+
"additionalProperties": false,
|
|
1222
|
+
"required": ["platform_id"],
|
|
1046
1223
|
"properties": {
|
|
1047
1224
|
"platform_id": { "type": "string", "format": "uuid" },
|
|
1048
|
-
"
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1225
|
+
"greeting": {
|
|
1226
|
+
"type": "object",
|
|
1227
|
+
"description": "Greeting / приветственное сообщение + кнопки.",
|
|
1228
|
+
"properties": {
|
|
1229
|
+
"bot_greeting": { "type": "string" },
|
|
1230
|
+
"greeting_file_id": { "type": ["string", "null"], "format": "uuid" },
|
|
1231
|
+
"greeting_buttons": {
|
|
1232
|
+
"type": "array",
|
|
1233
|
+
"items": {
|
|
1234
|
+
"type": "object",
|
|
1235
|
+
"required": ["id", "label", "text", "order"],
|
|
1236
|
+
"properties": {
|
|
1237
|
+
"id": { "type": "string" },
|
|
1238
|
+
"label": { "type": "string" },
|
|
1239
|
+
"text": { "type": "string" },
|
|
1240
|
+
"order": { "type": "integer" }
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
},
|
|
1244
|
+
"greeting_buttons_keyboard_type": { "type": "string", "enum": ["INLINE", "REPLY"] },
|
|
1245
|
+
"popup_delay_seconds": { "type": "integer", "minimum": 0 }
|
|
1246
|
+
}
|
|
1247
|
+
},
|
|
1248
|
+
"media_handling": {
|
|
1249
|
+
"type": "object",
|
|
1250
|
+
"description": "Стратегии обработки image/video/audio/document.",
|
|
1251
|
+
"properties": {
|
|
1252
|
+
"image": { "$ref": "#/$defs/mediaHandler" },
|
|
1253
|
+
"video": { "$ref": "#/$defs/mediaHandler" },
|
|
1254
|
+
"audio": { "$ref": "#/$defs/mediaHandler" },
|
|
1255
|
+
"document": { "$ref": "#/$defs/mediaHandler" }
|
|
1256
|
+
}
|
|
1257
|
+
},
|
|
1258
|
+
"url_handling": {
|
|
1259
|
+
"type": "object",
|
|
1260
|
+
"required": ["behavior"],
|
|
1261
|
+
"properties": {
|
|
1262
|
+
"behavior": { "type": "string", "enum": ["PASS_THROUGH", "SILENT", "FIXED_RESPONSE", "PROCESS_WITH_CRAWLER"] },
|
|
1263
|
+
"fixed_response_text": { "type": "string" },
|
|
1264
|
+
"call_operator": { "type": "boolean" },
|
|
1265
|
+
"operator_comment": { "type": "string" }
|
|
1266
|
+
}
|
|
1267
|
+
},
|
|
1268
|
+
"error_handling": {
|
|
1269
|
+
"type": "object",
|
|
1270
|
+
"properties": {
|
|
1271
|
+
"ai_error_behavior": { "type": "string", "enum": ["SILENT", "SEND_ERROR_MESSAGE"] },
|
|
1272
|
+
"ai_error_custom_message": { "type": "string" },
|
|
1273
|
+
"call_operator_with_error": { "type": "boolean" },
|
|
1274
|
+
"ai_error_target_stage_id": { "type": ["integer", "null"] }
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
"operator_schedule": {
|
|
1278
|
+
"type": "object",
|
|
1279
|
+
"properties": {
|
|
1280
|
+
"enabled": { "type": "boolean" },
|
|
1281
|
+
"availability": { "type": "object" },
|
|
1282
|
+
"unavailable_message": { "type": "string" },
|
|
1283
|
+
"bot_waiting_return_hours": { "type": "integer", "enum": [0, 1, 3, 6, 12, 24] },
|
|
1284
|
+
"follow_up_waiting_return_hours": { "type": "integer" },
|
|
1285
|
+
"skip_task_creation_on_call_operator": { "type": "boolean" }
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1288
|
+
"typing_behavior": {
|
|
1289
|
+
"type": "object",
|
|
1290
|
+
"properties": {
|
|
1291
|
+
"waiting_answer_time": { "type": "integer", "minimum": 0 },
|
|
1292
|
+
"can_interrupt": { "type": "boolean" },
|
|
1293
|
+
"message_devide": { "type": "boolean" },
|
|
1294
|
+
"typing_speed": { "type": "string", "enum": ["slow", "medium", "fast"] },
|
|
1295
|
+
"fake_delay": { "type": "integer", "minimum": 0 },
|
|
1296
|
+
"message_open_delay": { "type": "integer", "minimum": 0 },
|
|
1297
|
+
"go_offline": { "type": "string" }
|
|
1298
|
+
}
|
|
1299
|
+
},
|
|
1300
|
+
"message_filters": {
|
|
1301
|
+
"type": "array",
|
|
1302
|
+
"items": {
|
|
1303
|
+
"type": "object",
|
|
1304
|
+
"required": ["id", "source", "target", "enabled", "order"],
|
|
1305
|
+
"properties": {
|
|
1306
|
+
"id": { "type": "string" },
|
|
1307
|
+
"source": { "type": "string" },
|
|
1308
|
+
"target": { "type": "string" },
|
|
1309
|
+
"enabled": { "type": "boolean" },
|
|
1310
|
+
"order": { "type": "integer" }
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
},
|
|
1314
|
+
"message_splitting": {
|
|
1315
|
+
"type": "object",
|
|
1316
|
+
"properties": {
|
|
1317
|
+
"message_chunk_separator": { "type": "string" }
|
|
1318
|
+
}
|
|
1319
|
+
},
|
|
1320
|
+
"privacy": {
|
|
1321
|
+
"type": "object",
|
|
1322
|
+
"description": "Приватность канала: обратимая PII-анонимизация LLM-пайплайна (per-platform).",
|
|
1323
|
+
"properties": {
|
|
1324
|
+
"anonymization_enabled": { "type": "boolean" },
|
|
1325
|
+
"anonymization_disabled_types": {
|
|
1326
|
+
"type": "array",
|
|
1327
|
+
"description": "Типы PII, выключенные из анонимизации (отдаются в LLM как есть). Например [\"FIRST_NAME\"] оставляет имя для склонения. Значения: FIRST_NAME/LAST_NAME/PATRONYMIC/PERSON/PHONE/EMAIL/INN/PASSPORT/CARD/DATE_OF_BIRTH/ACCOUNT.",
|
|
1328
|
+
"items": {
|
|
1329
|
+
"type": "string",
|
|
1330
|
+
"enum": ["FIRST_NAME", "LAST_NAME", "PATRONYMIC", "PERSON", "PHONE", "EMAIL", "INN", "PASSPORT", "CARD", "DATE_OF_BIRTH", "ACCOUNT"]
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
"explicit_confirmation": { "type": "boolean" },
|
|
1336
|
+
"confirmation_reason": { "type": "string" }
|
|
1337
|
+
},
|
|
1338
|
+
"$defs": {
|
|
1339
|
+
"mediaHandler": {
|
|
1340
|
+
"type": "object",
|
|
1341
|
+
"required": ["behavior"],
|
|
1342
|
+
"properties": {
|
|
1343
|
+
"behavior": { "type": "string", "enum": ["SILENT", "PROCESS_WITH_LLM", "FIXED_RESPONSE"] },
|
|
1344
|
+
"fixed_response_text": { "type": "string" },
|
|
1345
|
+
"call_operator": { "type": "boolean" },
|
|
1346
|
+
"operator_comment": { "type": "string" }
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
"name": "besales_followup_sequence_upsert",
|
|
1354
|
+
"description": "Create or patch a follow-up sequence definition only. Runtime executions and scheduled messages are read-only; enabling requires explicit_confirmation.",
|
|
1355
|
+
"inputSchema": {
|
|
1356
|
+
"type": "object",
|
|
1357
|
+
"required": ["platform_id", "name", "type", "trigger", "config"],
|
|
1358
|
+
"properties": {
|
|
1359
|
+
"platform_id": { "type": "string", "format": "uuid" },
|
|
1360
|
+
"sequence_id": { "type": "string", "format": "uuid" },
|
|
1361
|
+
"name": { "type": "string" },
|
|
1362
|
+
"description": { "type": ["string", "null"] },
|
|
1363
|
+
"type": { "type": "string", "enum": ["MEETING_REMINDER", "INACTIVE_USER_REACTIVATION", "LOST_CLIENTS"] },
|
|
1364
|
+
"enabled": { "type": "boolean" },
|
|
1365
|
+
"trigger": { "type": "string", "enum": ["USER_INACTIVITY", "DEAL_CLOSED", "BIRTHDAY_DATE", "MEETING_TIME", "CUSTOM_SCHEDULE", "LOST_CLIENTS"] },
|
|
1366
|
+
"config": { "type": "object" },
|
|
1367
|
+
"explicit_confirmation": { "type": "boolean" },
|
|
1368
|
+
"confirmation_reason": { "type": "string" }
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
"name": "besales_pipeline_settings_update",
|
|
1374
|
+
"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.",
|
|
1375
|
+
"inputSchema": {
|
|
1376
|
+
"type": "object",
|
|
1377
|
+
"additionalProperties": false,
|
|
1378
|
+
"required": ["platform_id"],
|
|
1379
|
+
"properties": {
|
|
1380
|
+
"platform_id": { "type": "string", "format": "uuid" },
|
|
1381
|
+
"crm_pipeline_behavior": {
|
|
1382
|
+
"type": "object",
|
|
1383
|
+
"properties": {
|
|
1384
|
+
"active_pipeline_ids": { "type": "array", "items": { "type": "string" } },
|
|
1385
|
+
"filter_enabled": { "type": "boolean" },
|
|
1386
|
+
"status_movement": { "type": "object" },
|
|
1387
|
+
"create_defaults": { "type": "object" },
|
|
1388
|
+
"global": { "type": "object" }
|
|
1389
|
+
}
|
|
1390
|
+
},
|
|
1391
|
+
"auto_finish": {
|
|
1392
|
+
"type": "object",
|
|
1393
|
+
"properties": {
|
|
1394
|
+
"finish_auto_noanswer": { "type": "boolean" },
|
|
1395
|
+
"finish_auto_timeout": { "type": "boolean" },
|
|
1396
|
+
"finish_auto_days": { "type": "integer", "minimum": 1 },
|
|
1397
|
+
"send_finish_auto_note_to_crm": { "type": "boolean" },
|
|
1398
|
+
"finish_auto_note_template": { "type": ["string", "null"] }
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
"explicit_confirmation": { "type": "boolean" },
|
|
1402
|
+
"confirmation_reason": { "type": "string" }
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
"name": "besales_platform_settings_update",
|
|
1408
|
+
"description": "Patch allowlisted platform settings via flat-only fields (name, off_message, timezone) + typed sections (access_control, variables_config, crm_behavior, widget_marketing, instagram_comment_behavior). Phase B (2026-05-27): generic `settings` field удалён — отвергается с 400. Token/API key/secret fields are blocked; CRM-writing settings require explicit_confirmation.",
|
|
1409
|
+
"inputSchema": {
|
|
1410
|
+
"type": "object",
|
|
1411
|
+
"additionalProperties": false,
|
|
1412
|
+
"required": ["platform_id"],
|
|
1413
|
+
"properties": {
|
|
1414
|
+
"platform_id": { "type": "string", "format": "uuid" },
|
|
1415
|
+
"name": { "type": ["string", "null"], "description": "Display name платформы (flat-only — нет typed аналога)." },
|
|
1416
|
+
"off_message": { "type": "string", "description": "Off-hours / выключенный AI сообщение (flat-only)." },
|
|
1417
|
+
"timezone": { "type": "string", "description": "IANA timezone (Europe/Moscow, ...) (flat-only)." },
|
|
1418
|
+
"access_control": {
|
|
1419
|
+
"type": "object",
|
|
1420
|
+
"properties": {
|
|
1421
|
+
"is_active": { "type": "boolean" },
|
|
1422
|
+
"is_ai_enabled": { "type": "boolean" },
|
|
1423
|
+
"is_user_filter_enabled": { "type": "boolean" },
|
|
1424
|
+
"filtered_user_ids": { "type": "array", "items": { "type": "string" } }
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1427
|
+
"variables_config": {
|
|
1428
|
+
"type": "object",
|
|
1429
|
+
"properties": {
|
|
1430
|
+
"enable_dynamic_variables": { "type": "boolean" },
|
|
1431
|
+
"clear_dynamic_vars_on_history_clear": { "type": "boolean" }
|
|
1432
|
+
}
|
|
1433
|
+
},
|
|
1434
|
+
"crm_behavior": {
|
|
1435
|
+
"type": "object",
|
|
1436
|
+
"properties": {
|
|
1437
|
+
"send_to_crm": { "type": "boolean" },
|
|
1438
|
+
"use_cross_platform_history": { "type": "boolean" },
|
|
1439
|
+
"responsible_assignee_strategy": { "type": "string", "enum": ["ROUND_ROBIN", "LEAST_BUSY", "RANDOM", "FIXED", "OPERATOR_SPECIFIC"] },
|
|
1440
|
+
"fixed_responsible_id": { "type": ["string", "null"] },
|
|
1441
|
+
"send_start_note_to_crm": { "type": "boolean" },
|
|
1442
|
+
"start_note_template": { "type": ["string", "null"] },
|
|
1443
|
+
"send_failed_note_to_crm": { "type": "boolean" },
|
|
1444
|
+
"failed_note_template": { "type": ["string", "null"] },
|
|
1445
|
+
"send_operator_takeover_note_to_crm": { "type": "boolean" },
|
|
1446
|
+
"operator_takeover_note_template": { "type": ["string", "null"] }
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
"widget_marketing": {
|
|
1450
|
+
"type": "object",
|
|
1451
|
+
"properties": {
|
|
1452
|
+
"web_widget_allowed_origins": { "type": ["object", "null"] },
|
|
1453
|
+
"web_widget_show_page_info": { "type": "boolean" },
|
|
1454
|
+
"web_widget_rate_limit_per_minute": { "type": "integer", "minimum": 1, "maximum": 600 },
|
|
1455
|
+
"web_widget_customization": { "type": ["object", "null"] },
|
|
1456
|
+
"web_widget_marketing_field_mappings": { "type": ["object", "null"] },
|
|
1457
|
+
"web_widget_entry_url_variable_mapping": { "type": ["object", "null"] }
|
|
1458
|
+
}
|
|
1459
|
+
},
|
|
1460
|
+
"instagram_comment_behavior": {
|
|
1461
|
+
"type": "object",
|
|
1462
|
+
"properties": {
|
|
1463
|
+
"reply_to_instagram_comments": { "type": "boolean" },
|
|
1464
|
+
"instagram_comment_handling_mode": { "type": ["string", "null"] },
|
|
1465
|
+
"instagram_comment_reply_method": { "type": ["string", "null"] },
|
|
1466
|
+
"instagram_comment_keywords": { "type": ["object", "null"] },
|
|
1467
|
+
"reply_to_story_mentions": { "type": "boolean" }
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
"general_settings": {
|
|
1471
|
+
"type": "object",
|
|
1472
|
+
"properties": {
|
|
1473
|
+
"name": { "type": ["string", "null"] },
|
|
1474
|
+
"off_message": { "type": ["string", "null"] },
|
|
1475
|
+
"timezone": { "type": "string" },
|
|
1476
|
+
"is_active": { "type": "boolean" }
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
"salebot_settings": {
|
|
1480
|
+
"type": "object",
|
|
1481
|
+
"properties": {
|
|
1482
|
+
"project_id": { "type": ["string", "null"] },
|
|
1483
|
+
"group_id": { "type": ["string", "null"] }
|
|
1484
|
+
}
|
|
1485
|
+
},
|
|
1486
|
+
"smsgorod_settings": {
|
|
1487
|
+
"type": "object",
|
|
1488
|
+
"properties": {
|
|
1489
|
+
"channel": { "type": "string", "enum": ["DIGIT", "CHAR"] },
|
|
1490
|
+
"sender": { "type": ["string", "null"] }
|
|
1491
|
+
}
|
|
1492
|
+
},
|
|
1493
|
+
"bitrix24_bot_settings": {
|
|
1494
|
+
"type": "object",
|
|
1495
|
+
"properties": {
|
|
1496
|
+
"bot_id": { "type": ["integer", "null"] },
|
|
1497
|
+
"bot_code": { "type": ["string", "null"] },
|
|
1498
|
+
"bot_name": { "type": "string" },
|
|
1499
|
+
"open_line_id": { "type": ["string", "null"] }
|
|
1500
|
+
}
|
|
1501
|
+
},
|
|
1502
|
+
"getcourse_settings": {
|
|
1503
|
+
"type": "object",
|
|
1504
|
+
"properties": {
|
|
1505
|
+
"account_domain": { "type": ["string", "null"] },
|
|
1506
|
+
"employee_user_id": { "type": ["integer", "null"] },
|
|
1507
|
+
"available_transports": { "type": "array", "items": { "type": "string", "enum": ["Site", "Email", "SMS", "Telegram", "Facebook", "VK", "Chatium", "WhatsApp", "Viber"] } },
|
|
1508
|
+
"default_transport": { "type": ["string", "null"], "enum": ["Site", "Email", "SMS", "Telegram", "Facebook", "VK", "Chatium", "WhatsApp", "Viber", null] },
|
|
1509
|
+
"departments": { "type": ["array", "null"], "items": { "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string" } }, "required": ["id", "label"] } },
|
|
1510
|
+
"template_user_id": { "type": ["integer", "null"] },
|
|
1511
|
+
"template_deal_id": { "type": ["integer", "null"] }
|
|
1512
|
+
}
|
|
1513
|
+
},
|
|
1514
|
+
"explicit_confirmation": { "type": "boolean" },
|
|
1056
1515
|
"confirmation_reason": { "type": "string" }
|
|
1057
1516
|
}
|
|
1058
1517
|
}
|
|
1059
1518
|
},
|
|
1060
1519
|
{
|
|
1061
|
-
"name": "
|
|
1062
|
-
"description": "
|
|
1520
|
+
"name": "besales_audit_revert",
|
|
1521
|
+
"description": "Revert a reversible audit log. Передай `platform_id` для platform-scoped logs (записи через platform-setup-adapter); опусти для workspace-scoped logs (variables-adapter и аналоги).",
|
|
1522
|
+
"inputSchema": {
|
|
1523
|
+
"type": "object",
|
|
1524
|
+
"required": ["audit_log_id"],
|
|
1525
|
+
"properties": {
|
|
1526
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
1527
|
+
"platform_id": { "type": "string", "format": "uuid" },
|
|
1528
|
+
"audit_log_id": { "type": "string", "format": "uuid" }
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
"name": "besales_feedback_sheet_link",
|
|
1534
|
+
"description": "Привязать Google Sheets-таблицу с замечаниями тестировщиков к промпту агента. Принимает ссылку docs.google.com/spreadsheets/...; один файл можно привязать к нескольким промптам. В ответе — serviceAccountEmail: расшарьте таблицу на этот email (Viewer для READ_ONLY, Editor для EDITABLE).",
|
|
1535
|
+
"inputSchema": {
|
|
1536
|
+
"type": "object",
|
|
1537
|
+
"required": ["agent_id", "source_url"],
|
|
1538
|
+
"properties": {
|
|
1539
|
+
"agent_id": { "type": "string", "format": "uuid" },
|
|
1540
|
+
"source_url": {
|
|
1541
|
+
"type": "string",
|
|
1542
|
+
"description": "Ссылка на Google Sheet (docs.google.com/spreadsheets/...)."
|
|
1543
|
+
},
|
|
1544
|
+
"access_mode": {
|
|
1545
|
+
"type": "string",
|
|
1546
|
+
"enum": ["READ_ONLY", "EDITABLE"],
|
|
1547
|
+
"default": "READ_ONLY",
|
|
1548
|
+
"description": "Намерение: READ_ONLY — только чтение; EDITABLE — Phase 2 запись статусов строк."
|
|
1549
|
+
},
|
|
1550
|
+
"agent_version_id": { "type": "string", "format": "uuid" }
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
"name": "besales_feedback_sheet_list",
|
|
1556
|
+
"description": "Список Google Sheets-таблиц с замечаниями, привязанных к промпту агента. Вызывайте перед улучшением промпта, чтобы узнать, есть ли привязанные feedback-таблицы.",
|
|
1557
|
+
"inputSchema": {
|
|
1558
|
+
"type": "object",
|
|
1559
|
+
"required": ["agent_id"],
|
|
1560
|
+
"properties": {
|
|
1561
|
+
"agent_id": { "type": "string", "format": "uuid" }
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
"name": "besales_feedback_sheet_read",
|
|
1567
|
+
"description": "Прочитать содержимое feedback-таблицы — строки замечаний тестировщиков (rowNumber, rowHash, cells). Используйте замечания для правки промпта через patch flow: besales_prompt_patch_start → _apply → _commit.",
|
|
1568
|
+
"inputSchema": {
|
|
1569
|
+
"type": "object",
|
|
1570
|
+
"required": ["agent_id", "feedback_sheet_id"],
|
|
1571
|
+
"properties": {
|
|
1572
|
+
"agent_id": { "type": "string", "format": "uuid" },
|
|
1573
|
+
"feedback_sheet_id": { "type": "string", "format": "uuid" }
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
"name": "besales_feedback_sheet_unlink",
|
|
1579
|
+
"description": "Отвязать feedback-таблицу от промпта агента. Удаляет только привязку; сам файл и привязки к другим промптам сохраняются.",
|
|
1580
|
+
"inputSchema": {
|
|
1581
|
+
"type": "object",
|
|
1582
|
+
"required": ["agent_id", "feedback_sheet_id"],
|
|
1583
|
+
"properties": {
|
|
1584
|
+
"agent_id": { "type": "string", "format": "uuid" },
|
|
1585
|
+
"feedback_sheet_id": { "type": "string", "format": "uuid" }
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
"name": "besales_feedback_sheet_row_update",
|
|
1591
|
+
"description": "Phase 2: записать построчный статус замечаний в Google Sheet + светлую цветовую заливку строк. Требует accessMode=EDITABLE и доступ Editor у service account. Если service account не настроен — вернёт понятную ошибку «запись недоступна, доступно только чтение». При rowHash mismatch (строки сдвинулись между чтением и записью) → 409: перечитайте таблицу через besales_feedback_sheet_read и повторите.",
|
|
1592
|
+
"inputSchema": {
|
|
1593
|
+
"type": "object",
|
|
1594
|
+
"required": ["agent_id", "feedback_sheet_id", "rows"],
|
|
1595
|
+
"properties": {
|
|
1596
|
+
"agent_id": { "type": "string", "format": "uuid" },
|
|
1597
|
+
"feedback_sheet_id": { "type": "string", "format": "uuid" },
|
|
1598
|
+
"rows": {
|
|
1599
|
+
"type": "array",
|
|
1600
|
+
"minItems": 1,
|
|
1601
|
+
"items": {
|
|
1602
|
+
"type": "object",
|
|
1603
|
+
"required": ["row_number", "row_hash", "status"],
|
|
1604
|
+
"properties": {
|
|
1605
|
+
"row_number": {
|
|
1606
|
+
"type": "integer",
|
|
1607
|
+
"minimum": 2,
|
|
1608
|
+
"description": "1-based номер строки (>= 2; строка 1 — заголовки)"
|
|
1609
|
+
},
|
|
1610
|
+
"row_hash": {
|
|
1611
|
+
"type": "string",
|
|
1612
|
+
"description": "rowHash из besales_feedback_sheet_read — для re-anchoring"
|
|
1613
|
+
},
|
|
1614
|
+
"status": {
|
|
1615
|
+
"type": "string",
|
|
1616
|
+
"enum": ["done", "in_progress", "wont_fix", "needs_clarification"]
|
|
1617
|
+
},
|
|
1618
|
+
"comment": { "type": "string" }
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
"status_column": {
|
|
1623
|
+
"type": "string",
|
|
1624
|
+
"description": "A1-буква колонки статуса (если не задана — дописывается справа)"
|
|
1625
|
+
},
|
|
1626
|
+
"comment_column": {
|
|
1627
|
+
"type": "string",
|
|
1628
|
+
"description": "A1-буква колонки комментария (если не задана — дописывается справа)"
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
"name": "besales_facts_classify_and_migrate",
|
|
1635
|
+
"description": "S4.13 (v1.5 pipeline rules): читает AgentChat.factualContext Active block, LLM-классифицирует каждый chunk как Q&A pair или document paragraph, мигрирует Q&A через QaService.createQaPair и помечает document-chunks как `[doc:pending]` (text→document loader pending). Перемещает мигрированные chunks из `## Active facts` в `## Migrated`. Per-chunk write factualContext для минимизации race-окна. Endpoint: POST /api/v2/agents/{agentId}/facts/classify-and-migrate. Scope: write:knowledge.",
|
|
1636
|
+
"inputSchema": {
|
|
1637
|
+
"type": "object",
|
|
1638
|
+
"required": ["agent_id"],
|
|
1639
|
+
"properties": {
|
|
1640
|
+
"agent_id": {
|
|
1641
|
+
"type": "string",
|
|
1642
|
+
"format": "uuid",
|
|
1643
|
+
"description": "ID агента, чьи Active facts будут разобраны."
|
|
1644
|
+
},
|
|
1645
|
+
"namespace_record_id": {
|
|
1646
|
+
"type": "string",
|
|
1647
|
+
"format": "uuid",
|
|
1648
|
+
"description": "Optional. ID knowledge namespace для созданных Q&A. Если не передан — берётся первый `agent.knowledgeNamespaces[0]`. 400 если ни тот, ни другой не доступен."
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
"name": "besales_agent_facts_set",
|
|
1655
|
+
"description": "S2.5 extra (v1.5 pipeline rules): записывает AgentChat.factualContext целиком (markdown с секциями `## Active facts` / `## Migrated`). Простой setter — клиенты могут пополнять Active facts из feedback / sandbox observations / CSV. Возвращает warnings: если Active block превышает мягкий лимит ~2K токенов (8000 chars) — `soft_limit_exceeded`, и UI рекомендует запустить `besales_facts_classify_and_migrate`. Endpoint: PUT /api/v2/agents/{agentId}/facts. Scope: write:knowledge.",
|
|
1656
|
+
"inputSchema": {
|
|
1657
|
+
"type": "object",
|
|
1658
|
+
"required": ["agent_id", "factual_context"],
|
|
1659
|
+
"properties": {
|
|
1660
|
+
"agent_id": {
|
|
1661
|
+
"type": "string",
|
|
1662
|
+
"format": "uuid",
|
|
1663
|
+
"description": "ID агента."
|
|
1664
|
+
},
|
|
1665
|
+
"factual_context": {
|
|
1666
|
+
"type": "string",
|
|
1667
|
+
"description": "Markdown с факт-контекстом. Soft convention: `## Active facts` блок инъектится в системный промпт; `## Migrated` секция игнорируется (лог миграций в Q&A/документы)."
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
"name": "besales_prompt_patch_start",
|
|
1674
|
+
"description": "S3.8 (patch-based draft flow): создаёт PromptDraft — patch-based working copy промпта. Fork от текущей активной PromptVersion агента. Endpoint: POST /api/v2/agents/{agentId}/prompt/drafts. Сервер сам читает activePromptContentHash из AgentChat (clients не передают hash — защита от stale-hash submission). Auto-bootstrap для legacy agents (activePromptVersionId IS NULL) создаст initial PromptVersion в prompt-services из текущего baseSystemPrompt. Если на этом агенте есть pending drafts других пользователей — возвращается success + warning `conflictsWithOtherUsers`. Scope: write:prompt-drafts.",
|
|
1675
|
+
"inputSchema": {
|
|
1676
|
+
"type": "object",
|
|
1677
|
+
"required": ["agent_id"],
|
|
1678
|
+
"properties": {
|
|
1679
|
+
"agent_id": {
|
|
1680
|
+
"type": "string",
|
|
1681
|
+
"format": "uuid",
|
|
1682
|
+
"description": "ID агента, на котором создаётся draft."
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
"name": "besales_prompt_patch_get",
|
|
1689
|
+
"description": "S3.8: читает текущее состояние PromptDraft — currentContent, операции, status, TTL. Endpoint: GET /api/v2/agents/{agentId}/prompt/drafts/{draftId}. Scope: read:prompt-drafts.",
|
|
1690
|
+
"inputSchema": {
|
|
1691
|
+
"type": "object",
|
|
1692
|
+
"required": ["agent_id", "draft_id"],
|
|
1693
|
+
"properties": {
|
|
1694
|
+
"agent_id": { "type": "string", "format": "uuid" },
|
|
1695
|
+
"draft_id": { "type": "string", "format": "uuid" }
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
},
|
|
1699
|
+
{
|
|
1700
|
+
"name": "besales_prompt_patch_apply",
|
|
1701
|
+
"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, не перечитывай весь контент между батчами.",
|
|
1702
|
+
"inputSchema": {
|
|
1703
|
+
"type": "object",
|
|
1704
|
+
"required": ["agent_id", "draft_id", "operations"],
|
|
1705
|
+
"properties": {
|
|
1706
|
+
"agent_id": { "type": "string", "format": "uuid" },
|
|
1707
|
+
"draft_id": { "type": "string", "format": "uuid" },
|
|
1708
|
+
"operations": {
|
|
1709
|
+
"type": "array",
|
|
1710
|
+
"minItems": 1,
|
|
1711
|
+
"items": {
|
|
1712
|
+
"type": "object",
|
|
1713
|
+
"required": ["type"],
|
|
1714
|
+
"properties": {
|
|
1715
|
+
"id": { "type": "string" },
|
|
1716
|
+
"type": {
|
|
1717
|
+
"type": "string",
|
|
1718
|
+
"enum": [
|
|
1719
|
+
"replace_text",
|
|
1720
|
+
"replace_all_text",
|
|
1721
|
+
"insert_after_text",
|
|
1722
|
+
"insert_before_text",
|
|
1723
|
+
"remove_text",
|
|
1724
|
+
"move_text_after_text"
|
|
1725
|
+
]
|
|
1726
|
+
},
|
|
1727
|
+
"target_text": { "type": "string" },
|
|
1728
|
+
"anchor_text": { "type": "string" },
|
|
1729
|
+
"replacement_text": { "type": "string" },
|
|
1730
|
+
"match_variants": { "type": "array", "items": { "type": "string" } }
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
"name": "besales_prompt_patch_commit",
|
|
1739
|
+
"description": "S3.8: коммитит draft как новую PromptVersion. Pipeline: (1) Lint (PromptLintService) — hard_fail блокирует commit с 400; (2) Optimistic lock в prompt-services — `agentSideHash` server-side читается из AgentChat (если production prompt изменился между fork и commit → 409 PROMPT_DRAFT_REBASE_REQUIRED, discard и создай новый); (3) AgentChat sync с conditional UPDATE; (4) если sync упал после успешного PS commit → retry queue (success клиенту). Endpoint: POST /api/v2/agents/{agentId}/prompt/drafts/{draftId}/commit. Scope: write:prompt-drafts.",
|
|
1740
|
+
"inputSchema": {
|
|
1741
|
+
"type": "object",
|
|
1742
|
+
"required": ["agent_id", "draft_id"],
|
|
1743
|
+
"properties": {
|
|
1744
|
+
"agent_id": { "type": "string", "format": "uuid" },
|
|
1745
|
+
"draft_id": { "type": "string", "format": "uuid" }
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
},
|
|
1749
|
+
{
|
|
1750
|
+
"name": "besales_prompt_patch_discard",
|
|
1751
|
+
"description": "S3.8: discard draft (soft, status=DISCARDED). После discard draftId больше не валиден — создавай новый через `besales_prompt_patch_start` если нужно. Endpoint: DELETE /api/v2/agents/{agentId}/prompt/drafts/{draftId}. Scope: write:prompt-drafts.",
|
|
1752
|
+
"inputSchema": {
|
|
1753
|
+
"type": "object",
|
|
1754
|
+
"required": ["agent_id", "draft_id"],
|
|
1755
|
+
"properties": {
|
|
1756
|
+
"agent_id": { "type": "string", "format": "uuid" },
|
|
1757
|
+
"draft_id": { "type": "string", "format": "uuid" }
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
"name": "besales_prompt_lint",
|
|
1763
|
+
"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.",
|
|
1764
|
+
"inputSchema": {
|
|
1765
|
+
"type": "object",
|
|
1766
|
+
"required": ["prompt_text"],
|
|
1767
|
+
"properties": {
|
|
1768
|
+
"workspace_id": {
|
|
1769
|
+
"type": "string",
|
|
1770
|
+
"format": "uuid",
|
|
1771
|
+
"description": "ID workspace (optional — auto-injected MCP сервером из активного workspace context, как у besales_icp_create)."
|
|
1772
|
+
},
|
|
1773
|
+
"prompt_text": {
|
|
1774
|
+
"type": "string",
|
|
1775
|
+
"description": "Текст промпта для проверки (как в `AgentChat.baseSystemPrompt`)."
|
|
1776
|
+
},
|
|
1777
|
+
"agent_id": {
|
|
1778
|
+
"type": "string",
|
|
1779
|
+
"format": "uuid",
|
|
1780
|
+
"description": "Optional. Если передан — резолвит channel из `AgentChat.platformId → Platform.type` и agentScope из `AgentChat.agentScope`. Если не передан и явные `channel`/`agent_scope` тоже не переданы — markdown-checker для мессенджер-каналов и scope-consistency-checker пропускаются."
|
|
1781
|
+
},
|
|
1782
|
+
"channel": {
|
|
1783
|
+
"type": "string",
|
|
1784
|
+
"description": "Optional. Явная подмена канала (телеграм_бот / wazzup / instagram / ...). Если есть `agent_id`, тут можно перекрыть резолв."
|
|
1785
|
+
},
|
|
1786
|
+
"agent_scope": {
|
|
1787
|
+
"type": "string",
|
|
1788
|
+
"enum": ["sale", "reactivation", "support", "onboarding", "faq", "qualification", "complaint", "other"],
|
|
1789
|
+
"description": "Optional. Явная подмена scope для scope-consistency checker."
|
|
1790
|
+
},
|
|
1791
|
+
"feedback_banned_terms": {
|
|
1792
|
+
"type": "array",
|
|
1793
|
+
"items": { "type": "string" },
|
|
1794
|
+
"description": "Optional. Дополнительный словарь banned terms (warn-category) — например из §07 Sheets feedback."
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
"name": "besales_workbook_inspect",
|
|
1801
|
+
"description": "v1.5 workbook ingestion: открыть xlsx (по stored_file_id) или Google Sheets (по google_sheets_url) и вернуть структуру всех вкладок — sample rows с per-cell данными (value + hyperlink + formula) + per-column hyperlink статистика (lead/contact amoCRM). Создаёт SourceWorkbook record для provenance. Для xlsx — сначала загрузите файл через POST /api/v2/files. Для Google Sheets — если 403, response содержит serviceAccountEmail для расшарить. Sheet identifier в дальнейших вызовах — sheetTitle/sheetGid/sheetIndex в body. Scope: mcp:*.",
|
|
1802
|
+
"inputSchema": {
|
|
1803
|
+
"type": "object",
|
|
1804
|
+
"properties": {
|
|
1805
|
+
"workspace_id": {
|
|
1806
|
+
"type": "string",
|
|
1807
|
+
"format": "uuid",
|
|
1808
|
+
"description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)."
|
|
1809
|
+
},
|
|
1810
|
+
"stored_file_id": {
|
|
1811
|
+
"type": "string",
|
|
1812
|
+
"format": "uuid",
|
|
1813
|
+
"description": "ID загруженного xlsx через files endpoint. Один из stored_file_id или google_sheets_url обязателен."
|
|
1814
|
+
},
|
|
1815
|
+
"google_sheets_url": {
|
|
1816
|
+
"type": "string",
|
|
1817
|
+
"format": "uri",
|
|
1818
|
+
"description": "URL Google Sheets таблицы (расшаренной на service account email)."
|
|
1819
|
+
},
|
|
1820
|
+
"sample_rows_per_sheet": {
|
|
1821
|
+
"type": "integer",
|
|
1822
|
+
"minimum": 1,
|
|
1823
|
+
"maximum": 50,
|
|
1824
|
+
"default": 10,
|
|
1825
|
+
"description": "Сколько строк сверху каждого листа возвращать."
|
|
1826
|
+
},
|
|
1827
|
+
"max_cells_total": {
|
|
1828
|
+
"type": "integer",
|
|
1829
|
+
"minimum": 50,
|
|
1830
|
+
"maximum": 5000,
|
|
1831
|
+
"default": 500,
|
|
1832
|
+
"description": "Глобальный лимит ячеек в sample (защита от bloat)."
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
},
|
|
1837
|
+
{
|
|
1838
|
+
"name": "besales_workbook_extract_amocrm_leads",
|
|
1839
|
+
"description": "v1.5 workbook ingestion: прочитать вкладку SourceWorkbook ЦЕЛИКОМ (без sample-лимита inspect) и извлечь все amoCRM lead-ID из ячеек (value + hyperlink + formula). Используй когда `inspect` sample недостаточен — например, для большого диалог-индекса с 100+ ссылок. Sheet identifier — один из sheet_title / sheet_gid / sheet_index. Опционально include_contacts=true возвращает также contacts. Hard cap 10000 строк на лист. Scope: mcp:*.",
|
|
1840
|
+
"inputSchema": {
|
|
1841
|
+
"type": "object",
|
|
1842
|
+
"required": ["workbook_id"],
|
|
1843
|
+
"properties": {
|
|
1844
|
+
"workspace_id": {
|
|
1845
|
+
"type": "string",
|
|
1846
|
+
"format": "uuid",
|
|
1847
|
+
"description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)."
|
|
1848
|
+
},
|
|
1849
|
+
"workbook_id": { "type": "string", "format": "uuid" },
|
|
1850
|
+
"sheet_title": { "type": "string" },
|
|
1851
|
+
"sheet_gid": { "type": "integer" },
|
|
1852
|
+
"sheet_index": { "type": "integer", "minimum": 0 },
|
|
1853
|
+
"include_contacts": {
|
|
1854
|
+
"type": "boolean",
|
|
1855
|
+
"default": false,
|
|
1856
|
+
"description": "Если true — возвращает также contacts (/contacts/detail/). По умолчанию только leads."
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
},
|
|
1861
|
+
{
|
|
1862
|
+
"name": "besales_workbook_to_knowledge_document",
|
|
1863
|
+
"description": "v1.5 workbook ingestion: превратить вкладку SourceWorkbook в KnowledgeDocument. Сервер сам выбирает splitMode через heuristic (markdown ## headers / === / paragraphs / Q&A pairs / numbered / fallback fixed-size), либо клиент явно передаёт split_override. Idempotency: повторный вызов для того же (workbook, sheet) заменяет существующий AI_INGESTED документ (replaceExisting=true по умолчанию). Sheet identifier — один из sheet_title / sheet_gid / sheet_index в body (не в path, потому что названия вкладок содержат кириллицу/пробелы). Endpoint: POST /api/v2/workspaces/{workspaceId}/workbooks/{workbookId}/knowledge-document. Scope: mcp:platform-setup.",
|
|
1864
|
+
"inputSchema": {
|
|
1865
|
+
"type": "object",
|
|
1866
|
+
"required": ["workbook_id"],
|
|
1867
|
+
"properties": {
|
|
1868
|
+
"workspace_id": {
|
|
1869
|
+
"type": "string",
|
|
1870
|
+
"format": "uuid",
|
|
1871
|
+
"description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)."
|
|
1872
|
+
},
|
|
1873
|
+
"workbook_id": { "type": "string", "format": "uuid" },
|
|
1874
|
+
"sheet_title": {
|
|
1875
|
+
"type": "string",
|
|
1876
|
+
"description": "Название листа (точное совпадение). Один из sheet_title/sheet_gid/sheet_index обязателен."
|
|
1877
|
+
},
|
|
1878
|
+
"sheet_gid": {
|
|
1879
|
+
"type": "integer",
|
|
1880
|
+
"description": "Числовой gid листа (для Google Sheets)."
|
|
1881
|
+
},
|
|
1882
|
+
"sheet_index": {
|
|
1883
|
+
"type": "integer",
|
|
1884
|
+
"minimum": 0,
|
|
1885
|
+
"description": "Индекс листа в xlsx (0-based)."
|
|
1886
|
+
},
|
|
1887
|
+
"namespace": {
|
|
1888
|
+
"type": "string",
|
|
1889
|
+
"description": "Knowledge namespace (по умолчанию 'general')."
|
|
1890
|
+
},
|
|
1891
|
+
"split_override": {
|
|
1892
|
+
"type": "object",
|
|
1893
|
+
"description": "Optional. Явное переопределение chunking — heuristic игнорируется.",
|
|
1894
|
+
"required": ["split_mode"],
|
|
1895
|
+
"properties": {
|
|
1896
|
+
"split_mode": { "type": "string", "enum": ["size", "separator"] },
|
|
1897
|
+
"separator": { "type": "string" },
|
|
1898
|
+
"chunk_size": { "type": "integer", "minimum": 100 },
|
|
1899
|
+
"chunk_overlap": { "type": "integer", "minimum": 0 },
|
|
1900
|
+
"max_chunk_size": { "type": "integer", "minimum": 100 }
|
|
1901
|
+
}
|
|
1902
|
+
},
|
|
1903
|
+
"replace_existing": {
|
|
1904
|
+
"type": "boolean",
|
|
1905
|
+
"default": true,
|
|
1906
|
+
"description": "Заменять ли существующий AI_INGESTED документ для того же листа (по умолчанию true)."
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
"name": "besales_knowledge_space_create",
|
|
1913
|
+
"description": "v1.5 Increment 1: создать knowledge space (WORKSPACE или CHANNEL scope). WORKSPACE-spec'ы доступны всем каналам workspace через channel-links (M:N); CHANNEL-spec жёстко привязан к одному каналу. Возвращает id для последующего ingestion. Mapping: scope_type=CHANNEL → v1 Namespace.scopeType=PLATFORM. Scope: mcp:platform-setup.",
|
|
1914
|
+
"inputSchema": {
|
|
1915
|
+
"type": "object",
|
|
1916
|
+
"required": ["name", "scope_type"],
|
|
1917
|
+
"properties": {
|
|
1918
|
+
"workspace_id": {
|
|
1919
|
+
"type": "string",
|
|
1920
|
+
"format": "uuid",
|
|
1921
|
+
"description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)."
|
|
1922
|
+
},
|
|
1923
|
+
"name": {
|
|
1924
|
+
"type": "string",
|
|
1925
|
+
"minLength": 1,
|
|
1926
|
+
"maxLength": 100,
|
|
1927
|
+
"description": "Человекочитаемое имя (латиница/цифры/_/-)."
|
|
1928
|
+
},
|
|
1929
|
+
"scope_type": {
|
|
1930
|
+
"type": "string",
|
|
1931
|
+
"enum": ["WORKSPACE", "CHANNEL"]
|
|
1932
|
+
},
|
|
1933
|
+
"channel_id": {
|
|
1934
|
+
"type": "string",
|
|
1935
|
+
"format": "uuid",
|
|
1936
|
+
"description": "Обязателен для scope_type=CHANNEL; запрещён для scope_type=WORKSPACE."
|
|
1937
|
+
},
|
|
1938
|
+
"access_mode": {
|
|
1939
|
+
"type": "string",
|
|
1940
|
+
"enum": ["AUTO_QUERY", "TOOL_ONLY"],
|
|
1941
|
+
"default": "AUTO_QUERY",
|
|
1942
|
+
"description": "AUTO_QUERY — включается в поиск автоматически; TOOL_ONLY — только через специальный инструмент."
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
},
|
|
1947
|
+
{
|
|
1948
|
+
"name": "besales_knowledge_space_list",
|
|
1949
|
+
"description": "v1.5 Increment 1: список knowledge spaces workspace с опциональными фильтрами scope_type/channel_id. Каждый space включает source_counts (documents/qa/websites/tables). Scope: read:knowledge (composite в mcp:*).",
|
|
1950
|
+
"inputSchema": {
|
|
1951
|
+
"type": "object",
|
|
1952
|
+
"properties": {
|
|
1953
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
1954
|
+
"scope_type": { "type": "string", "enum": ["WORKSPACE", "CHANNEL"] },
|
|
1955
|
+
"channel_id": { "type": "string", "format": "uuid" }
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
"name": "besales_knowledge_space_get",
|
|
1961
|
+
"description": "v1.5 Increment 1: detail knowledge space по id с source_counts и attached_channels (M:N links). Scope: read:knowledge.",
|
|
1962
|
+
"inputSchema": {
|
|
1963
|
+
"type": "object",
|
|
1964
|
+
"required": ["knowledge_space_id"],
|
|
1965
|
+
"properties": {
|
|
1966
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
1967
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" }
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
},
|
|
1971
|
+
{
|
|
1972
|
+
"name": "besales_knowledge_space_patch",
|
|
1973
|
+
"description": "v1.5 Increment 1: обновить name или access_mode. Смена scope_type НЕ поддерживается (deferred — нужен move-endpoint в будущем). Scope: mcp:platform-setup.",
|
|
1974
|
+
"inputSchema": {
|
|
1975
|
+
"type": "object",
|
|
1976
|
+
"required": ["knowledge_space_id"],
|
|
1977
|
+
"properties": {
|
|
1978
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
1979
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
1980
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 100 },
|
|
1981
|
+
"access_mode": { "type": "string", "enum": ["AUTO_QUERY", "TOOL_ONLY"] }
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
},
|
|
1985
|
+
{
|
|
1986
|
+
"name": "besales_knowledge_space_channel_link_upsert",
|
|
1987
|
+
"description": "v1.5 Increment 1: привязать канал к WORKSPACE-spec'у (M:N relation, эквивалент v1 PlatformNamespace). Поддерживается ТОЛЬКО для scope_type=WORKSPACE spaces. Scope: mcp:platform-setup.",
|
|
1988
|
+
"inputSchema": {
|
|
1989
|
+
"type": "object",
|
|
1990
|
+
"required": ["knowledge_space_id", "channel_id"],
|
|
1991
|
+
"properties": {
|
|
1992
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
1993
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
1994
|
+
"channel_id": { "type": "string", "format": "uuid" }
|
|
1995
|
+
}
|
|
1996
|
+
}
|
|
1997
|
+
},
|
|
1998
|
+
{
|
|
1999
|
+
"name": "besales_knowledge_space_channel_link_remove",
|
|
2000
|
+
"description": "v1.5 Increment 1: открепить канал от WORKSPACE-spec'а. Scope: mcp:platform-setup.",
|
|
2001
|
+
"inputSchema": {
|
|
2002
|
+
"type": "object",
|
|
2003
|
+
"required": ["knowledge_space_id", "channel_id"],
|
|
2004
|
+
"properties": {
|
|
2005
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2006
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2007
|
+
"channel_id": { "type": "string", "format": "uuid" }
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
},
|
|
2011
|
+
{
|
|
2012
|
+
"name": "besales_knowledge_document_upload",
|
|
2013
|
+
"description": "v1.5 Increment 1: загрузить KnowledgeDocument в указанный knowledge space. Два режима: source_kind=STORED_FILE (reuse уже загруженный файл по stored_file_id, обычно PDF/DOCX) либо source_kind=TEXT (raw inline content, обычно markdown). Idempotency TEXT: повторный upload с тем же filename заменяет старый AI_INGESTED документ. Async processing: status PENDING→COMPLETED|FAILED — опрашивай через besales_knowledge_document_get. Scope: write:knowledge.",
|
|
2014
|
+
"inputSchema": {
|
|
2015
|
+
"type": "object",
|
|
2016
|
+
"required": ["knowledge_space_id", "source_kind"],
|
|
2017
|
+
"properties": {
|
|
2018
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2019
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2020
|
+
"source_kind": { "type": "string", "enum": ["STORED_FILE", "TEXT"] },
|
|
2021
|
+
"stored_file_id": {
|
|
2022
|
+
"type": "string",
|
|
2023
|
+
"format": "uuid",
|
|
2024
|
+
"description": "Обязателен при source_kind=STORED_FILE. Файл должен быть предварительно загружен через POST /api/v2/files."
|
|
2025
|
+
},
|
|
2026
|
+
"content": {
|
|
2027
|
+
"type": "string",
|
|
2028
|
+
"description": "Обязателен при source_kind=TEXT. Inline текст (markdown / plain), до ~2MB."
|
|
2029
|
+
},
|
|
2030
|
+
"filename": {
|
|
2031
|
+
"type": "string",
|
|
2032
|
+
"description": "Обязателен при source_kind=TEXT. Имя файла для отображения и idempotency-ключ."
|
|
2033
|
+
},
|
|
2034
|
+
"split_override": {
|
|
2035
|
+
"type": "object",
|
|
2036
|
+
"description": "Optional. Явное переопределение chunking.",
|
|
2037
|
+
"required": ["split_mode"],
|
|
2038
|
+
"properties": {
|
|
2039
|
+
"split_mode": { "type": "string", "enum": ["size", "separator"] },
|
|
2040
|
+
"separator": { "type": "string" },
|
|
2041
|
+
"chunk_size": { "type": "integer", "minimum": 100 },
|
|
2042
|
+
"chunk_overlap": { "type": "integer", "minimum": 0 },
|
|
2043
|
+
"max_chunk_size": { "type": "integer", "minimum": 100 }
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
},
|
|
2049
|
+
{
|
|
2050
|
+
"name": "besales_knowledge_document_list",
|
|
2051
|
+
"description": "v1.5 Increment 1: список документов в knowledge space (paginated, фильтр по status). Scope: read:knowledge.",
|
|
2052
|
+
"inputSchema": {
|
|
2053
|
+
"type": "object",
|
|
2054
|
+
"required": ["knowledge_space_id"],
|
|
2055
|
+
"properties": {
|
|
2056
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2057
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2058
|
+
"status": {
|
|
2059
|
+
"type": "string",
|
|
2060
|
+
"enum": [
|
|
2061
|
+
"LOADED",
|
|
2062
|
+
"SPLIT",
|
|
2063
|
+
"EMBEDDINGS_GENERATED",
|
|
2064
|
+
"VECTOR_DB_UPLOADED",
|
|
2065
|
+
"COMPLETED",
|
|
2066
|
+
"FAILED",
|
|
2067
|
+
"TEXT_EXTRACTED",
|
|
2068
|
+
"CHUNKS_SAVED"
|
|
2069
|
+
]
|
|
2070
|
+
},
|
|
2071
|
+
"page": { "type": "integer", "minimum": 1, "default": 1 },
|
|
2072
|
+
"limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 }
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
"name": "besales_knowledge_document_get",
|
|
2078
|
+
"description": "v1.5 Increment 1: detail документа по id с chunks_summary (preview первого чанка + total bytes). Scope: read:knowledge.",
|
|
2079
|
+
"inputSchema": {
|
|
2080
|
+
"type": "object",
|
|
2081
|
+
"required": ["knowledge_space_id", "document_id"],
|
|
2082
|
+
"properties": {
|
|
2083
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2084
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2085
|
+
"document_id": { "type": "string", "format": "uuid" }
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
},
|
|
2089
|
+
{
|
|
2090
|
+
"name": "besales_knowledge_document_delete",
|
|
2091
|
+
"description": "v1.5 Increment 1: удалить knowledge document (вместе с chunks и Pinecone vectors). Требует explicit_confirmation=true как safety guard. Scope: write:knowledge.",
|
|
2092
|
+
"inputSchema": {
|
|
2093
|
+
"type": "object",
|
|
2094
|
+
"required": ["knowledge_space_id", "document_id", "explicit_confirmation"],
|
|
2095
|
+
"properties": {
|
|
2096
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2097
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2098
|
+
"document_id": { "type": "string", "format": "uuid" },
|
|
2099
|
+
"explicit_confirmation": {
|
|
2100
|
+
"type": "boolean",
|
|
2101
|
+
"description": "Должен быть true. False → 400 BadRequest."
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
},
|
|
2106
|
+
{
|
|
2107
|
+
"name": "besales_knowledge_qa_create",
|
|
2108
|
+
"description": "v1.5 Increment 2: создать Q&A пару в knowledge space. Embedding для вопроса генерируется sync. answer (legacy) либо answer_chunks (max 20). mode: SIMPLE (default, с RAG) | STRICT (без RAG) | ONCE_STRICT (первый раз STRICT). Scope: write:knowledge.",
|
|
2109
|
+
"inputSchema": {
|
|
2110
|
+
"type": "object",
|
|
2111
|
+
"required": ["knowledge_space_id", "question"],
|
|
2112
|
+
"properties": {
|
|
2113
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2114
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2115
|
+
"question": { "type": "string", "minLength": 1 },
|
|
2116
|
+
"answer": { "type": "string" },
|
|
2117
|
+
"answer_chunks": {
|
|
2118
|
+
"type": "array",
|
|
2119
|
+
"maxItems": 20,
|
|
2120
|
+
"items": {
|
|
2121
|
+
"type": "object",
|
|
2122
|
+
"properties": {
|
|
2123
|
+
"text": { "type": "string" },
|
|
2124
|
+
"stored_file_id": { "type": "string", "format": "uuid" },
|
|
2125
|
+
"buttons": {
|
|
2126
|
+
"type": "array",
|
|
2127
|
+
"items": {
|
|
2128
|
+
"type": "object",
|
|
2129
|
+
"required": ["name", "url"],
|
|
2130
|
+
"properties": {
|
|
2131
|
+
"name": { "type": "string" },
|
|
2132
|
+
"url": { "type": "string" }
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
},
|
|
2139
|
+
"alias": { "type": "string" },
|
|
2140
|
+
"mode": { "type": "string", "enum": ["SIMPLE", "STRICT", "ONCE_STRICT"] },
|
|
2141
|
+
"call_operator": { "type": "boolean" },
|
|
2142
|
+
"chunk_delay_seconds": { "type": "integer", "minimum": 1 },
|
|
2143
|
+
"is_call_qa_only": { "type": "boolean" }
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
},
|
|
2147
|
+
{
|
|
2148
|
+
"name": "besales_knowledge_qa_list",
|
|
2149
|
+
"description": "v1.5 Increment 2: список Q&A пар в knowledge space (paginated, фильтр по mode). Scope: read:knowledge.",
|
|
2150
|
+
"inputSchema": {
|
|
2151
|
+
"type": "object",
|
|
2152
|
+
"required": ["knowledge_space_id"],
|
|
2153
|
+
"properties": {
|
|
2154
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2155
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2156
|
+
"mode": { "type": "string", "enum": ["SIMPLE", "STRICT", "ONCE_STRICT"] },
|
|
2157
|
+
"page": { "type": "integer", "minimum": 1, "default": 1 },
|
|
2158
|
+
"limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 }
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
},
|
|
2162
|
+
{
|
|
2163
|
+
"name": "besales_knowledge_qa_get",
|
|
2164
|
+
"description": "v1.5 Increment 2: detail Q&A пары по id (с answer_chunks). Scope: read:knowledge.",
|
|
2165
|
+
"inputSchema": {
|
|
2166
|
+
"type": "object",
|
|
2167
|
+
"required": ["knowledge_space_id", "qa_id"],
|
|
2168
|
+
"properties": {
|
|
2169
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2170
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2171
|
+
"qa_id": { "type": "string", "format": "uuid" }
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
},
|
|
2175
|
+
{
|
|
2176
|
+
"name": "besales_knowledge_qa_patch",
|
|
2177
|
+
"description": "v1.5 Increment 2: частичное обновление Q&A. Любое из полей опционально. При изменении question embedding пересчитывается. Scope: write:knowledge.",
|
|
2178
|
+
"inputSchema": {
|
|
2179
|
+
"type": "object",
|
|
2180
|
+
"required": ["knowledge_space_id", "qa_id"],
|
|
2181
|
+
"properties": {
|
|
2182
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2183
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2184
|
+
"qa_id": { "type": "string", "format": "uuid" },
|
|
2185
|
+
"question": { "type": "string", "minLength": 1 },
|
|
2186
|
+
"answer": { "type": "string" },
|
|
2187
|
+
"answer_chunks": {
|
|
2188
|
+
"type": "array",
|
|
2189
|
+
"maxItems": 20,
|
|
2190
|
+
"items": {
|
|
2191
|
+
"type": "object",
|
|
2192
|
+
"properties": {
|
|
2193
|
+
"text": { "type": "string" },
|
|
2194
|
+
"stored_file_id": { "type": "string", "format": "uuid" },
|
|
2195
|
+
"buttons": {
|
|
2196
|
+
"type": "array",
|
|
2197
|
+
"items": {
|
|
2198
|
+
"type": "object",
|
|
2199
|
+
"required": ["name", "url"],
|
|
2200
|
+
"properties": {
|
|
2201
|
+
"name": { "type": "string" },
|
|
2202
|
+
"url": { "type": "string" }
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
},
|
|
2209
|
+
"alias": { "type": "string" },
|
|
2210
|
+
"mode": { "type": "string", "enum": ["SIMPLE", "STRICT", "ONCE_STRICT"] },
|
|
2211
|
+
"call_operator": { "type": "boolean" },
|
|
2212
|
+
"chunk_delay_seconds": { "type": "integer", "minimum": 1 },
|
|
2213
|
+
"is_call_qa_only": { "type": "boolean" }
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
},
|
|
2217
|
+
{
|
|
2218
|
+
"name": "besales_knowledge_qa_delete",
|
|
2219
|
+
"description": "v1.5 Increment 2: удалить Q&A пару (вместе с answer_chunks и Pinecone vector). Требует explicit_confirmation=true. Scope: write:knowledge.",
|
|
2220
|
+
"inputSchema": {
|
|
2221
|
+
"type": "object",
|
|
2222
|
+
"required": ["knowledge_space_id", "qa_id", "explicit_confirmation"],
|
|
2223
|
+
"properties": {
|
|
2224
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2225
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2226
|
+
"qa_id": { "type": "string", "format": "uuid" },
|
|
2227
|
+
"explicit_confirmation": {
|
|
2228
|
+
"type": "boolean",
|
|
2229
|
+
"description": "Должен быть true. False → 400 BadRequest."
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
},
|
|
2234
|
+
{
|
|
2235
|
+
"name": "besales_knowledge_qa_search",
|
|
2236
|
+
"description": "v1.5 Increment 2: семантический поиск Q&A в knowledge space (Pinecone similarity). top_k default 5, max 50. min_score фильтрует результаты ниже порога. Scope: read:knowledge.",
|
|
2237
|
+
"inputSchema": {
|
|
2238
|
+
"type": "object",
|
|
2239
|
+
"required": ["knowledge_space_id", "query"],
|
|
2240
|
+
"properties": {
|
|
2241
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2242
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2243
|
+
"query": { "type": "string", "minLength": 1 },
|
|
2244
|
+
"top_k": { "type": "integer", "minimum": 1, "maximum": 50, "default": 5 },
|
|
2245
|
+
"min_score": { "type": "number", "description": "Optional similarity threshold 0..1." }
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
},
|
|
2249
|
+
{
|
|
2250
|
+
"name": "besales_knowledge_qa_move",
|
|
2251
|
+
"description": "v1.5 Increment 2: переместить Q&A в другой knowledge space. Реализуется как delete + recreate (Pinecone vector переиндексируется в new namespace). Возвращается { new_id, old_id, target_space_id } — обнови ссылки на old_id в caller-коде. Alias НЕ переносится (unique-per-workspace). Требует explicit_confirmation=true. Scope: write:knowledge.",
|
|
2252
|
+
"inputSchema": {
|
|
2253
|
+
"type": "object",
|
|
2254
|
+
"required": ["source_space_id", "qa_id", "target_space_id", "explicit_confirmation"],
|
|
2255
|
+
"properties": {
|
|
2256
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2257
|
+
"source_space_id": { "type": "string", "format": "uuid" },
|
|
2258
|
+
"qa_id": { "type": "string", "format": "uuid" },
|
|
2259
|
+
"target_space_id": { "type": "string", "format": "uuid" },
|
|
2260
|
+
"explicit_confirmation": {
|
|
2261
|
+
"type": "boolean",
|
|
2262
|
+
"description": "Должен быть true. False → 400 BadRequest."
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
},
|
|
2267
|
+
{
|
|
2268
|
+
"name": "besales_knowledge_website_add",
|
|
2269
|
+
"description": "v1.5 Increment 2: добавить website в knowledge space. SYNC operation (Firecrawl + chunking + Pinecone upsert) — может занять несколько секунд. Idempotency: повторный POST с тем же URL вернёт existing site (replaced=true); FAILED перезапускается. Scope: write:knowledge.",
|
|
2270
|
+
"inputSchema": {
|
|
2271
|
+
"type": "object",
|
|
2272
|
+
"required": ["knowledge_space_id", "url"],
|
|
2273
|
+
"properties": {
|
|
2274
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2275
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2276
|
+
"url": { "type": "string", "format": "uri" },
|
|
2277
|
+
"display_name": { "type": "string", "description": "Optional. Default: domain." }
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
},
|
|
2281
|
+
{
|
|
2282
|
+
"name": "besales_knowledge_website_list",
|
|
2283
|
+
"description": "v1.5 Increment 2: список websites в knowledge space (paginated, фильтр по status). Scope: read:knowledge.",
|
|
2284
|
+
"inputSchema": {
|
|
2285
|
+
"type": "object",
|
|
2286
|
+
"required": ["knowledge_space_id"],
|
|
2287
|
+
"properties": {
|
|
2288
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2289
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2290
|
+
"status": {
|
|
2291
|
+
"type": "string",
|
|
2292
|
+
"enum": ["PENDING", "CRAWLING", "PROCESSING", "COMPLETED", "FAILED"]
|
|
2293
|
+
},
|
|
2294
|
+
"page": { "type": "integer", "minimum": 1, "default": 1 },
|
|
2295
|
+
"limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 }
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
},
|
|
2299
|
+
{
|
|
2300
|
+
"name": "besales_knowledge_website_get",
|
|
2301
|
+
"description": "v1.5 Increment 2: detail website по id (с domain, title, embedding_model, chunk_size). Scope: read:knowledge.",
|
|
2302
|
+
"inputSchema": {
|
|
2303
|
+
"type": "object",
|
|
2304
|
+
"required": ["knowledge_space_id", "website_id"],
|
|
2305
|
+
"properties": {
|
|
2306
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2307
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2308
|
+
"website_id": { "type": "string", "format": "uuid" }
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
},
|
|
2312
|
+
{
|
|
2313
|
+
"name": "besales_knowledge_website_delete",
|
|
2314
|
+
"description": "v1.5 Increment 2: удалить website (вместе с chunks и Pinecone vectors). Требует explicit_confirmation=true. Scope: write:knowledge.",
|
|
2315
|
+
"inputSchema": {
|
|
2316
|
+
"type": "object",
|
|
2317
|
+
"required": ["knowledge_space_id", "website_id", "explicit_confirmation"],
|
|
2318
|
+
"properties": {
|
|
2319
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2320
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2321
|
+
"website_id": { "type": "string", "format": "uuid" },
|
|
2322
|
+
"explicit_confirmation": {
|
|
2323
|
+
"type": "boolean",
|
|
2324
|
+
"description": "Должен быть true. False → 400 BadRequest."
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
}
|
|
2328
|
+
},
|
|
2329
|
+
{
|
|
2330
|
+
"name": "besales_knowledge_table_link",
|
|
2331
|
+
"description": "v1.5 Increment 3: связать knowledge table (Google Sheets) с knowledge space. Idempotency by (namespaceRecordId, url) — existing → replaced=true. Scope: write:knowledge.",
|
|
2332
|
+
"inputSchema": {
|
|
2333
|
+
"type": "object",
|
|
2334
|
+
"required": ["knowledge_space_id", "source", "display_name"],
|
|
2335
|
+
"properties": {
|
|
2336
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2337
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2338
|
+
"source": {
|
|
2339
|
+
"type": "object",
|
|
2340
|
+
"required": ["kind"],
|
|
2341
|
+
"properties": {
|
|
2342
|
+
"kind": { "type": "string", "enum": ["GOOGLE_SHEETS", "NATIVE"] },
|
|
2343
|
+
"spreadsheet_url": { "type": "string" },
|
|
2344
|
+
"table_schema": { "type": "object" }
|
|
2345
|
+
}
|
|
2346
|
+
},
|
|
2347
|
+
"display_name": { "type": "string" },
|
|
2348
|
+
"header_row_index": { "type": "integer", "minimum": 1 },
|
|
2349
|
+
"cache_ttl_seconds": { "type": "integer", "minimum": 1 },
|
|
2350
|
+
"use_vector_index": { "type": "boolean" },
|
|
2351
|
+
"vector_top_k": { "type": "integer", "minimum": 1 },
|
|
2352
|
+
"vector_embed_max_chars": { "type": "integer", "minimum": 1 },
|
|
2353
|
+
"access": { "type": "string", "enum": ["PUBLIC", "PRIVATE"] }
|
|
2354
|
+
}
|
|
2355
|
+
}
|
|
2356
|
+
},
|
|
2357
|
+
{
|
|
2358
|
+
"name": "besales_knowledge_table_list",
|
|
2359
|
+
"description": "v1.5 Increment 3: список knowledge tables (paginated, фильтр is_active). Scope: read:knowledge.",
|
|
2360
|
+
"inputSchema": {
|
|
2361
|
+
"type": "object",
|
|
2362
|
+
"required": ["knowledge_space_id"],
|
|
2363
|
+
"properties": {
|
|
2364
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2365
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2366
|
+
"is_active": { "type": "boolean" },
|
|
2367
|
+
"page": { "type": "integer", "minimum": 1 },
|
|
2368
|
+
"limit": { "type": "integer", "minimum": 1, "maximum": 100 }
|
|
2369
|
+
}
|
|
2370
|
+
}
|
|
2371
|
+
},
|
|
2372
|
+
{
|
|
2373
|
+
"name": "besales_knowledge_table_get",
|
|
2374
|
+
"description": "v1.5 Increment 3: detail knowledge table. Scope: read:knowledge.",
|
|
2375
|
+
"inputSchema": {
|
|
2376
|
+
"type": "object",
|
|
2377
|
+
"required": ["knowledge_space_id", "table_id"],
|
|
2378
|
+
"properties": {
|
|
2379
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2380
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2381
|
+
"table_id": { "type": "string", "format": "uuid" }
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
},
|
|
2385
|
+
{
|
|
2386
|
+
"name": "besales_knowledge_table_patch",
|
|
2387
|
+
"description": "v1.5 Increment 3: обновить knowledge table (source.url иммутабельный — для смены URL используй delete+create). Scope: write:knowledge.",
|
|
2388
|
+
"inputSchema": {
|
|
2389
|
+
"type": "object",
|
|
2390
|
+
"required": ["knowledge_space_id", "table_id"],
|
|
2391
|
+
"properties": {
|
|
2392
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2393
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2394
|
+
"table_id": { "type": "string", "format": "uuid" },
|
|
2395
|
+
"source": {
|
|
2396
|
+
"type": "object",
|
|
2397
|
+
"description": "Если передан — URL должен совпадать с existing; иначе 400."
|
|
2398
|
+
},
|
|
2399
|
+
"display_name": { "type": "string" },
|
|
2400
|
+
"header_row_index": { "type": "integer", "minimum": 1 },
|
|
2401
|
+
"cache_ttl_seconds": { "type": "integer", "minimum": 1 },
|
|
2402
|
+
"use_vector_index": { "type": "boolean" },
|
|
2403
|
+
"vector_top_k": { "type": "integer", "minimum": 1 },
|
|
2404
|
+
"vector_embed_max_chars": { "type": "integer", "minimum": 1 },
|
|
2405
|
+
"access": { "type": "string", "enum": ["PUBLIC", "PRIVATE"] },
|
|
2406
|
+
"is_active": { "type": "boolean" }
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
},
|
|
2410
|
+
{
|
|
2411
|
+
"name": "besales_knowledge_table_delete",
|
|
2412
|
+
"description": "v1.5 Increment 3: удалить knowledge table + Pinecone vectors. Требует explicit_confirmation=true. Scope: write:knowledge.",
|
|
2413
|
+
"inputSchema": {
|
|
2414
|
+
"type": "object",
|
|
2415
|
+
"required": ["knowledge_space_id", "table_id", "explicit_confirmation"],
|
|
2416
|
+
"properties": {
|
|
2417
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2418
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2419
|
+
"table_id": { "type": "string", "format": "uuid" },
|
|
2420
|
+
"explicit_confirmation": { "type": "boolean" }
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
},
|
|
2424
|
+
{
|
|
2425
|
+
"name": "besales_knowledge_table_reindex",
|
|
2426
|
+
"description": "v1.5 Increment 3: полная переиндексация таблицы (delete vectors + re-fetch CSV + re-embed + Pinecone upsert). SYNC operation — может занять время для больших таблиц. Scope: write:knowledge.",
|
|
2427
|
+
"inputSchema": {
|
|
2428
|
+
"type": "object",
|
|
2429
|
+
"required": ["knowledge_space_id", "table_id", "explicit_confirmation"],
|
|
2430
|
+
"properties": {
|
|
2431
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2432
|
+
"knowledge_space_id": { "type": "string", "format": "uuid" },
|
|
2433
|
+
"table_id": { "type": "string", "format": "uuid" },
|
|
2434
|
+
"explicit_confirmation": { "type": "boolean" }
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
"name": "besales_variable_list",
|
|
2440
|
+
"description": "v1.5 Increment 4a: список переменных. scope=WORKSPACE возвращает глобальные WorkspaceVariable (доступны всем платформам); scope=CHANNEL требует platform_id и возвращает CustomVariable одной платформы (filter: all|variables|constants). Референс в промпте/шаблоне: WORKSPACE → {{{name}}} (тройные фигурные), CHANNEL-константа → {{name}} (двойные). Scope: mcp:platform-setup.",
|
|
2441
|
+
"inputSchema": {
|
|
2442
|
+
"type": "object",
|
|
2443
|
+
"required": ["scope"],
|
|
2444
|
+
"additionalProperties": false,
|
|
2445
|
+
"properties": {
|
|
2446
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2447
|
+
"scope": { "type": "string", "enum": ["WORKSPACE", "CHANNEL"] },
|
|
2448
|
+
"platform_id": {
|
|
2449
|
+
"type": "string",
|
|
2450
|
+
"format": "uuid",
|
|
2451
|
+
"description": "Required when scope=CHANNEL"
|
|
2452
|
+
},
|
|
2453
|
+
"filter": {
|
|
2454
|
+
"type": "string",
|
|
2455
|
+
"enum": ["all", "variables", "constants"],
|
|
2456
|
+
"description": "Filter для CHANNEL scope; default=all"
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
}
|
|
2460
|
+
},
|
|
2461
|
+
{
|
|
2462
|
+
"name": "besales_variable_create",
|
|
2463
|
+
"description": "v1.5 Increment 4a: создать переменную. WORKSPACE scope — глобальная (поля: name, type, value?); CHANNEL scope — platform-scoped (требует platform_id, поддерживает is_constant + constant_value). name + scope + is_constant immutable post-create. Референс в тексте: WORKSPACE → {{{name}}} (тройные фигурные), CHANNEL-константа → {{name}} (двойные). WORKSPACE-переменные интерполируются в baseSystemPrompt агента в рантайме — используй прямо в промпте (не только в шаблонах сообщений); сменил значение через besales_variable_update → промпт править не нужно. Scope: mcp:platform-setup.",
|
|
2464
|
+
"inputSchema": {
|
|
2465
|
+
"type": "object",
|
|
2466
|
+
"required": ["scope", "name", "type"],
|
|
2467
|
+
"additionalProperties": false,
|
|
2468
|
+
"properties": {
|
|
2469
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2470
|
+
"scope": { "type": "string", "enum": ["WORKSPACE", "CHANNEL"] },
|
|
2471
|
+
"name": {
|
|
2472
|
+
"type": "string",
|
|
2473
|
+
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
|
|
2474
|
+
"description": "Variable name (ASCII letters/digits/underscores; starts with letter or _)"
|
|
2475
|
+
},
|
|
2476
|
+
"description": { "type": "string" },
|
|
2477
|
+
"type": { "type": "string", "enum": ["TEXT", "NUMBER", "FLOAT", "BOOLEAN"] },
|
|
2478
|
+
"value": {
|
|
2479
|
+
"type": "string",
|
|
2480
|
+
"description": "WORKSPACE scope only"
|
|
2481
|
+
},
|
|
2482
|
+
"platform_id": {
|
|
2483
|
+
"type": "string",
|
|
2484
|
+
"format": "uuid",
|
|
2485
|
+
"description": "Required when scope=CHANNEL"
|
|
2486
|
+
},
|
|
2487
|
+
"is_constant": {
|
|
2488
|
+
"type": "boolean",
|
|
2489
|
+
"description": "CHANNEL scope only"
|
|
2490
|
+
},
|
|
2491
|
+
"constant_value": {
|
|
2492
|
+
"type": "string",
|
|
2493
|
+
"description": "Required when scope=CHANNEL AND is_constant=true"
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
"name": "besales_variable_get",
|
|
2500
|
+
"description": "v1.5 Increment 4a: получить переменную по id. scope+platform_id (для CHANNEL) необходимы для роутинга между двумя backend таблицами. Adapter валидирует ownership на каждый вызов (защита от cross-workspace утечки). Scope: mcp:platform-setup.",
|
|
2501
|
+
"inputSchema": {
|
|
2502
|
+
"type": "object",
|
|
2503
|
+
"required": ["variable_id", "scope"],
|
|
2504
|
+
"additionalProperties": false,
|
|
2505
|
+
"properties": {
|
|
2506
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2507
|
+
"variable_id": { "type": "string", "format": "uuid" },
|
|
2508
|
+
"scope": { "type": "string", "enum": ["WORKSPACE", "CHANNEL"] },
|
|
2509
|
+
"platform_id": {
|
|
2510
|
+
"type": "string",
|
|
2511
|
+
"format": "uuid",
|
|
2512
|
+
"description": "Required when scope=CHANNEL"
|
|
2513
|
+
}
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
},
|
|
2517
|
+
{
|
|
2518
|
+
"name": "besales_variable_update",
|
|
2519
|
+
"description": "v1.5 Increment 4a: обновить переменную (description / type / value / constant_value). name + scope + is_constant immutable post-create. value=null или constant_value=null обнуляют. Ownership guard на CHANNEL scope. Audit reversible с before snapshot. Scope: mcp:platform-setup.",
|
|
2520
|
+
"inputSchema": {
|
|
2521
|
+
"type": "object",
|
|
2522
|
+
"required": ["variable_id", "scope"],
|
|
2523
|
+
"additionalProperties": false,
|
|
2524
|
+
"properties": {
|
|
2525
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2526
|
+
"variable_id": { "type": "string", "format": "uuid" },
|
|
2527
|
+
"scope": { "type": "string", "enum": ["WORKSPACE", "CHANNEL"] },
|
|
2528
|
+
"platform_id": {
|
|
2529
|
+
"type": "string",
|
|
2530
|
+
"format": "uuid",
|
|
2531
|
+
"description": "Required when scope=CHANNEL"
|
|
2532
|
+
},
|
|
2533
|
+
"description": { "type": "string" },
|
|
2534
|
+
"type": { "type": "string", "enum": ["TEXT", "NUMBER", "FLOAT", "BOOLEAN"] },
|
|
2535
|
+
"value": {
|
|
2536
|
+
"type": ["string", "null"],
|
|
2537
|
+
"description": "WORKSPACE scope only; null clears"
|
|
2538
|
+
},
|
|
2539
|
+
"constant_value": {
|
|
2540
|
+
"type": ["string", "null"],
|
|
2541
|
+
"description": "CHANNEL scope only; null clears"
|
|
2542
|
+
}
|
|
2543
|
+
}
|
|
2544
|
+
}
|
|
2545
|
+
},
|
|
2546
|
+
{
|
|
2547
|
+
"name": "besales_variable_delete",
|
|
2548
|
+
"description": "v1.5 Increment 4a: удалить переменную. Требует explicit_confirmation=true (literal). Audit reversible через besales_audit_revert (восстанавливает строку из beforeSnapshot). Scope: mcp:platform-setup.",
|
|
2549
|
+
"inputSchema": {
|
|
2550
|
+
"type": "object",
|
|
2551
|
+
"required": ["variable_id", "scope", "explicit_confirmation"],
|
|
2552
|
+
"additionalProperties": false,
|
|
2553
|
+
"properties": {
|
|
2554
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2555
|
+
"variable_id": { "type": "string", "format": "uuid" },
|
|
2556
|
+
"scope": { "type": "string", "enum": ["WORKSPACE", "CHANNEL"] },
|
|
2557
|
+
"platform_id": {
|
|
2558
|
+
"type": "string",
|
|
2559
|
+
"format": "uuid",
|
|
2560
|
+
"description": "Required when scope=CHANNEL"
|
|
2561
|
+
},
|
|
2562
|
+
"explicit_confirmation": { "const": true }
|
|
2563
|
+
}
|
|
2564
|
+
}
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
"name": "besales_crm_pipeline_list",
|
|
2568
|
+
"description": "v1.5 Increment 4b: list CRM воронок (триггерит sync с external CRM — AmoCRM/Bitrix24 — на каждом вызове). Scope: mcp:platform-setup.",
|
|
2569
|
+
"inputSchema": {
|
|
2570
|
+
"type": "object",
|
|
2571
|
+
"required": ["crm_id"],
|
|
2572
|
+
"additionalProperties": false,
|
|
2573
|
+
"properties": {
|
|
2574
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2575
|
+
"crm_id": { "type": "string", "format": "uuid" },
|
|
2576
|
+
"include_deleted": { "type": "boolean", "default": false }
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
},
|
|
2580
|
+
{
|
|
2581
|
+
"name": "besales_crm_pipeline_get",
|
|
2582
|
+
"description": "v1.5 Increment 4b: get single CRM воронки с nested statuses. Scope: mcp:platform-setup.",
|
|
2583
|
+
"inputSchema": {
|
|
2584
|
+
"type": "object",
|
|
2585
|
+
"required": ["crm_id", "pipeline_id"],
|
|
2586
|
+
"additionalProperties": false,
|
|
2587
|
+
"properties": {
|
|
2588
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2589
|
+
"crm_id": { "type": "string", "format": "uuid" },
|
|
2590
|
+
"pipeline_id": { "type": "integer" }
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
},
|
|
2594
|
+
{
|
|
2595
|
+
"name": "besales_crm_pipeline_create",
|
|
2596
|
+
"description": "v1.5 Increment 4b: ⚠️ создаёт воронку в EXTERNAL CRM (AmoCRM/Bitrix24 API call). GetCourse — требует pipeline_id (manual funnel_id). External CRM ops NOT undoable через MCP. Audit phases: create.attempt → create.success / create.failure. Scope: mcp:platform-setup.",
|
|
2597
|
+
"inputSchema": {
|
|
2598
|
+
"type": "object",
|
|
2599
|
+
"required": ["crm_id", "name", "acknowledge_external_side_effect"],
|
|
2600
|
+
"additionalProperties": false,
|
|
2601
|
+
"properties": {
|
|
2602
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2603
|
+
"crm_id": { "type": "string", "format": "uuid" },
|
|
2604
|
+
"name": { "type": "string" },
|
|
2605
|
+
"sort": { "type": "integer" },
|
|
2606
|
+
"is_main": { "type": "boolean" },
|
|
2607
|
+
"is_unsorted_on": { "type": "boolean" },
|
|
2608
|
+
"is_active": { "type": "boolean" },
|
|
2609
|
+
"pipeline_id": {
|
|
2610
|
+
"type": "integer",
|
|
2611
|
+
"description": "Required для GetCourse (manual funnel_id); ignored для AmoCRM/Bitrix24"
|
|
2612
|
+
},
|
|
2613
|
+
"acknowledge_external_side_effect": { "const": true }
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
},
|
|
2617
|
+
{
|
|
2618
|
+
"name": "besales_crm_pipeline_update",
|
|
2619
|
+
"description": "v1.5 Increment 4b: update pipeline metadata (syncs to external CRM if supports updatePipeline). Не touches aiResponseMoveToStatus — those live в PipelineSettings (besales_pipeline_settings_update). Scope: mcp:platform-setup.",
|
|
2620
|
+
"inputSchema": {
|
|
2621
|
+
"type": "object",
|
|
2622
|
+
"required": [
|
|
2623
|
+
"crm_id",
|
|
2624
|
+
"pipeline_id",
|
|
2625
|
+
"acknowledge_external_side_effect"
|
|
2626
|
+
],
|
|
2627
|
+
"additionalProperties": false,
|
|
2628
|
+
"properties": {
|
|
2629
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2630
|
+
"crm_id": { "type": "string", "format": "uuid" },
|
|
2631
|
+
"pipeline_id": { "type": "integer" },
|
|
2632
|
+
"name": { "type": "string" },
|
|
2633
|
+
"sort": { "type": "integer" },
|
|
2634
|
+
"is_main": { "type": "boolean" },
|
|
2635
|
+
"is_unsorted_on": { "type": "boolean" },
|
|
2636
|
+
"is_active": { "type": "boolean" },
|
|
2637
|
+
"acknowledge_external_side_effect": { "const": true }
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
},
|
|
2641
|
+
{
|
|
2642
|
+
"name": "besales_crm_pipeline_delete",
|
|
2643
|
+
"description": "v1.5 Increment 4b: ⚠️ soft delete locally + EXTERNAL CRM API call. Refuses if isMain=true. NOT undoable. Scope: mcp:platform-setup.",
|
|
2644
|
+
"inputSchema": {
|
|
2645
|
+
"type": "object",
|
|
2646
|
+
"required": [
|
|
2647
|
+
"crm_id",
|
|
2648
|
+
"pipeline_id",
|
|
2649
|
+
"explicit_confirmation",
|
|
2650
|
+
"acknowledge_external_side_effect"
|
|
2651
|
+
],
|
|
2652
|
+
"additionalProperties": false,
|
|
2653
|
+
"properties": {
|
|
2654
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2655
|
+
"crm_id": { "type": "string", "format": "uuid" },
|
|
2656
|
+
"pipeline_id": { "type": "integer" },
|
|
2657
|
+
"explicit_confirmation": { "const": true },
|
|
2658
|
+
"acknowledge_external_side_effect": { "const": true }
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
2661
|
+
},
|
|
2662
|
+
{
|
|
2663
|
+
"name": "besales_crm_pipeline_status_list",
|
|
2664
|
+
"description": "v1.5 Increment 4b: list statuses for a pipeline. Scope: mcp:platform-setup.",
|
|
2665
|
+
"inputSchema": {
|
|
2666
|
+
"type": "object",
|
|
2667
|
+
"required": ["crm_id", "pipeline_id"],
|
|
2668
|
+
"additionalProperties": false,
|
|
2669
|
+
"properties": {
|
|
2670
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2671
|
+
"crm_id": { "type": "string", "format": "uuid" },
|
|
2672
|
+
"pipeline_id": { "type": "integer" }
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
},
|
|
2676
|
+
{
|
|
2677
|
+
"name": "besales_crm_pipeline_status_create",
|
|
2678
|
+
"description": "v1.5 Increment 4b: ⚠️ creates status в EXTERNAL CRM. GetCourse — требует status_id (manual funnel_stage_id). Scope: mcp:platform-setup.",
|
|
2679
|
+
"inputSchema": {
|
|
2680
|
+
"type": "object",
|
|
2681
|
+
"required": [
|
|
2682
|
+
"crm_id",
|
|
2683
|
+
"pipeline_id",
|
|
2684
|
+
"name",
|
|
2685
|
+
"sort",
|
|
2686
|
+
"acknowledge_external_side_effect"
|
|
2687
|
+
],
|
|
2688
|
+
"additionalProperties": false,
|
|
2689
|
+
"properties": {
|
|
2690
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2691
|
+
"crm_id": { "type": "string", "format": "uuid" },
|
|
2692
|
+
"pipeline_id": { "type": "integer" },
|
|
2693
|
+
"name": { "type": "string" },
|
|
2694
|
+
"sort": { "type": "integer" },
|
|
2695
|
+
"color": { "type": "string" },
|
|
2696
|
+
"status_types": { "type": "array", "items": { "type": "string" } },
|
|
2697
|
+
"is_editable": { "type": "boolean" },
|
|
2698
|
+
"is_bot_active": { "type": "boolean" },
|
|
2699
|
+
"is_operator_available": { "type": "boolean" },
|
|
2700
|
+
"on_message_received_move_to_status": { "type": ["integer", "null"] },
|
|
2701
|
+
"status_id": {
|
|
2702
|
+
"type": "integer",
|
|
2703
|
+
"description": "Required для GetCourse (manual funnel_stage_id)"
|
|
2704
|
+
},
|
|
2705
|
+
"acknowledge_external_side_effect": { "const": true }
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
"name": "besales_crm_pipeline_status_update",
|
|
2711
|
+
"description": "v1.5 Increment 4b: update status (skip external CRM update if status.isEditable=false). Scope: mcp:platform-setup.",
|
|
2712
|
+
"inputSchema": {
|
|
2713
|
+
"type": "object",
|
|
2714
|
+
"required": [
|
|
2715
|
+
"crm_id",
|
|
2716
|
+
"pipeline_id",
|
|
2717
|
+
"status_id",
|
|
2718
|
+
"acknowledge_external_side_effect"
|
|
2719
|
+
],
|
|
2720
|
+
"additionalProperties": false,
|
|
2721
|
+
"properties": {
|
|
2722
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2723
|
+
"crm_id": { "type": "string", "format": "uuid" },
|
|
2724
|
+
"pipeline_id": { "type": "integer" },
|
|
2725
|
+
"status_id": { "type": "integer" },
|
|
2726
|
+
"name": { "type": "string" },
|
|
2727
|
+
"sort": { "type": "integer" },
|
|
2728
|
+
"color": { "type": "string" },
|
|
2729
|
+
"status_types": { "type": "array", "items": { "type": "string" } },
|
|
2730
|
+
"is_editable": { "type": "boolean" },
|
|
2731
|
+
"is_bot_active": { "type": "boolean" },
|
|
2732
|
+
"is_operator_available": { "type": "boolean" },
|
|
2733
|
+
"on_message_received_move_to_status": { "type": ["integer", "null"] },
|
|
2734
|
+
"acknowledge_external_side_effect": { "const": true }
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
},
|
|
2738
|
+
{
|
|
2739
|
+
"name": "besales_crm_pipeline_status_delete",
|
|
2740
|
+
"description": "v1.5 Increment 4b: ⚠️ delete status в EXTERNAL CRM. Scope: mcp:platform-setup.",
|
|
2741
|
+
"inputSchema": {
|
|
2742
|
+
"type": "object",
|
|
2743
|
+
"required": [
|
|
2744
|
+
"crm_id",
|
|
2745
|
+
"pipeline_id",
|
|
2746
|
+
"status_id",
|
|
2747
|
+
"explicit_confirmation",
|
|
2748
|
+
"acknowledge_external_side_effect"
|
|
2749
|
+
],
|
|
2750
|
+
"additionalProperties": false,
|
|
2751
|
+
"properties": {
|
|
2752
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2753
|
+
"crm_id": { "type": "string", "format": "uuid" },
|
|
2754
|
+
"pipeline_id": { "type": "integer" },
|
|
2755
|
+
"status_id": { "type": "integer" },
|
|
2756
|
+
"explicit_confirmation": { "const": true },
|
|
2757
|
+
"acknowledge_external_side_effect": { "const": true }
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
},
|
|
2761
|
+
{
|
|
2762
|
+
"name": "besales_platform_pipeline_link",
|
|
2763
|
+
"description": "v1.5 Increment 4b: добавить активную воронку к платформе (local-only M:N junction, reversible audit). Scope: mcp:platform-setup.",
|
|
2764
|
+
"inputSchema": {
|
|
2765
|
+
"type": "object",
|
|
2766
|
+
"required": ["platform_id", "pipeline_id", "pipeline_crm_id"],
|
|
2767
|
+
"additionalProperties": false,
|
|
2768
|
+
"properties": {
|
|
2769
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2770
|
+
"platform_id": { "type": "string", "format": "uuid" },
|
|
2771
|
+
"pipeline_id": { "type": "integer" },
|
|
2772
|
+
"pipeline_crm_id": { "type": "string", "format": "uuid" },
|
|
2773
|
+
"sort": { "type": "integer", "minimum": 0 }
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
},
|
|
2777
|
+
{
|
|
2778
|
+
"name": "besales_platform_pipeline_unlink",
|
|
2779
|
+
"description": "v1.5 Increment 4b: удалить связь платформа↔воронка (local-only, reversible через besales_audit_revert с beforeSnapshot). Scope: mcp:platform-setup.",
|
|
2780
|
+
"inputSchema": {
|
|
2781
|
+
"type": "object",
|
|
2782
|
+
"required": [
|
|
2783
|
+
"platform_id",
|
|
2784
|
+
"platform_pipeline_id",
|
|
2785
|
+
"explicit_confirmation"
|
|
2786
|
+
],
|
|
2787
|
+
"additionalProperties": false,
|
|
2788
|
+
"properties": {
|
|
2789
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2790
|
+
"platform_id": { "type": "string", "format": "uuid" },
|
|
2791
|
+
"platform_pipeline_id": { "type": "string", "format": "uuid" },
|
|
2792
|
+
"explicit_confirmation": { "const": true }
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
},
|
|
2796
|
+
{
|
|
2797
|
+
"name": "besales_platform_clone_preview",
|
|
2798
|
+
"description": "v1.5 Increment 4d: build PreviewPlan (no writes) для cross-platform clone. Returns preview_token (Redis TTL 15 min) + summary{counts, totalEntities} + conflicts[] + warnings[]. Strict mode: блокирует unsafe fallback на 'any other platform' в PlatformCopyService. Hard cap 1000 entities. Scope: mcp:platform-setup.",
|
|
2799
|
+
"inputSchema": {
|
|
2800
|
+
"type": "object",
|
|
2801
|
+
"required": ["source_platform_id", "target_platform_id", "include"],
|
|
2802
|
+
"additionalProperties": false,
|
|
2803
|
+
"properties": {
|
|
2804
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2805
|
+
"source_platform_id": { "type": "string", "format": "uuid" },
|
|
2806
|
+
"target_platform_id": { "type": "string", "format": "uuid" },
|
|
2807
|
+
"include": {
|
|
2808
|
+
"type": "object",
|
|
2809
|
+
"additionalProperties": false,
|
|
2810
|
+
"properties": {
|
|
2811
|
+
"agents": { "type": "boolean" },
|
|
2812
|
+
"agent_tools": { "type": "boolean" },
|
|
2813
|
+
"triggers": { "type": "boolean" },
|
|
2814
|
+
"behavior": { "type": "boolean" },
|
|
2815
|
+
"platform_settings": { "type": "boolean" },
|
|
2816
|
+
"pipeline_settings": { "type": "boolean" },
|
|
2817
|
+
"knowledge_space_links": { "type": "boolean" },
|
|
2818
|
+
"follow_up_sequences": { "type": "boolean" },
|
|
2819
|
+
"custom_variables": { "type": "boolean" }
|
|
2820
|
+
}
|
|
2821
|
+
},
|
|
2822
|
+
"conflict_mode": { "type": "string", "enum": ["reject", "merge", "overwrite"] },
|
|
2823
|
+
"name_collision_strategy": { "type": "string", "enum": ["suffix", "keep"] }
|
|
2824
|
+
}
|
|
2825
|
+
}
|
|
2826
|
+
},
|
|
2827
|
+
{
|
|
2828
|
+
"name": "besales_platform_clone_execute",
|
|
2829
|
+
"description": "v1.5 Increment 4d: execute clone replays PreviewPlan в Prisma transaction с pg_advisory_xact_lock на target_platform_id. Требует preview_token + explicit_confirmation=true. Когда conflict_mode=overwrite заменит существующие entities (preview.requires_destructive_ack=true) — обязателен ВТОРОЙ literal acknowledge_destructive_overwrite=true. Idempotency: same idempotency_key (24h) → cached result. Reversible через besales_audit_revert. Scope: mcp:platform-setup.",
|
|
2830
|
+
"inputSchema": {
|
|
2831
|
+
"type": "object",
|
|
2832
|
+
"required": [
|
|
2833
|
+
"preview_token",
|
|
2834
|
+
"source_platform_id",
|
|
2835
|
+
"target_platform_id",
|
|
2836
|
+
"explicit_confirmation"
|
|
2837
|
+
],
|
|
2838
|
+
"additionalProperties": false,
|
|
2839
|
+
"properties": {
|
|
2840
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2841
|
+
"preview_token": { "type": "string", "format": "uuid" },
|
|
2842
|
+
"source_platform_id": { "type": "string", "format": "uuid" },
|
|
2843
|
+
"target_platform_id": { "type": "string", "format": "uuid" },
|
|
2844
|
+
"explicit_confirmation": { "const": true },
|
|
2845
|
+
"acknowledge_destructive_overwrite": { "const": true },
|
|
2846
|
+
"idempotency_key": { "type": "string", "minLength": 1, "maxLength": 255 },
|
|
2847
|
+
"actor_note": { "type": "string", "maxLength": 2000 }
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2850
|
+
},
|
|
2851
|
+
{
|
|
2852
|
+
"name": "besales_platform_clone_status",
|
|
2853
|
+
"description": "v1.5 Increment 4d: get CloneRun status by id (inspection). Returns { status, sourcePlatformId, targetPlatformId, createdAt, finishedAt, auditLogId, summary }. Scope: mcp:platform-setup.",
|
|
2854
|
+
"inputSchema": {
|
|
2855
|
+
"type": "object",
|
|
2856
|
+
"required": ["clone_id"],
|
|
2857
|
+
"additionalProperties": false,
|
|
2858
|
+
"properties": {
|
|
2859
|
+
"workspace_id": { "type": "string", "format": "uuid" },
|
|
2860
|
+
"clone_id": { "type": "string", "format": "uuid" }
|
|
2861
|
+
}
|
|
2862
|
+
}
|
|
2863
|
+
},
|
|
2864
|
+
{
|
|
2865
|
+
"name": "besales_file_upload_request",
|
|
2866
|
+
"description": "v1.5 Increment 5a: создать upload-сессию (Setup URL pattern). Возвращает { upload_ref, upload_page_url, expires_at }. Файл НЕ передаётся через MCP — пользователь открывает upload_page_url в браузере и загружает файл (TTL 15 мин). Scope: mcp:platform-setup.",
|
|
2867
|
+
"inputSchema": {
|
|
2868
|
+
"type": "object",
|
|
2869
|
+
"required": ["name"],
|
|
2870
|
+
"additionalProperties": false,
|
|
2871
|
+
"properties": {
|
|
2872
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
2873
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 255, "description": "Желаемое уникальное имя файла в workspace." },
|
|
2874
|
+
"file_type": { "type": "string", "enum": ["IMAGE", "DOCUMENT", "VIDEO", "AUDIO", "VOICE", "VIDEO_NOTE", "OTHER"] },
|
|
2875
|
+
"section_id": { "type": "string", "format": "uuid" },
|
|
2876
|
+
"source": { "type": "string", "enum": ["USER_UPLOAD", "AGENT_GREETING", "CAMPAIGN", "CRM_IMPORT", "OTHER"] },
|
|
2877
|
+
"mime_type": { "type": "string", "maxLength": 255 },
|
|
2878
|
+
"size_bytes": { "type": "integer", "minimum": 1, "maximum": 41943040 }
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
},
|
|
2882
|
+
{
|
|
2883
|
+
"name": "besales_file_upload_status",
|
|
2884
|
+
"description": "v1.5 Increment 5a: статус upload-сессии (polling по upload_ref). status: AWAITING_USER → VALIDATING → READY (stored_file_id готов) | VALIDATION_FAILED (error_message) | EXPIRED. Scope: mcp:platform-setup.",
|
|
2885
|
+
"inputSchema": {
|
|
2886
|
+
"type": "object",
|
|
2887
|
+
"required": ["upload_ref"],
|
|
2888
|
+
"additionalProperties": false,
|
|
2889
|
+
"properties": {
|
|
2890
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
2891
|
+
"upload_ref": { "type": "string", "minLength": 1 }
|
|
2892
|
+
}
|
|
2893
|
+
}
|
|
2894
|
+
},
|
|
2895
|
+
{
|
|
2896
|
+
"name": "besales_file_list",
|
|
2897
|
+
"description": "v1.5 Increment 5a: список файлов workspace (фильтры file_type/source/section_id + пагинация). Возвращает { files[], total }. Scope: mcp:platform-setup.",
|
|
2898
|
+
"inputSchema": {
|
|
2899
|
+
"type": "object",
|
|
2900
|
+
"required": [],
|
|
2901
|
+
"additionalProperties": false,
|
|
2902
|
+
"properties": {
|
|
2903
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
2904
|
+
"file_type": { "type": "string", "enum": ["IMAGE", "DOCUMENT", "VIDEO", "AUDIO", "VOICE", "VIDEO_NOTE", "OTHER"] },
|
|
2905
|
+
"source": { "type": "string", "enum": ["USER_UPLOAD", "AGENT_GREETING", "CAMPAIGN", "CRM_IMPORT", "OTHER"] },
|
|
2906
|
+
"section_id": { "type": "string" },
|
|
2907
|
+
"limit": { "type": "integer", "minimum": 1, "maximum": 200 },
|
|
2908
|
+
"offset": { "type": "integer", "minimum": 0 }
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
},
|
|
2912
|
+
{
|
|
2913
|
+
"name": "besales_platform_create_init",
|
|
2914
|
+
"description": "v1.5 Increment 5b: создать platform provisioning сессию (Setup URL pattern) для API-key канала. Секреты НЕ передаются через MCP — пользователь вводит их на setup_page_url. Возвращает { setup_ref, setup_page_url, expires_at, required_secret_fields }. OAuth-каналы (Instagram/Avito) — besales_platform_create_oauth_init; TelegramPersonal не поддержан. Scope: mcp:platform-setup.",
|
|
2915
|
+
"inputSchema": {
|
|
2916
|
+
"type": "object",
|
|
2917
|
+
"required": ["platform_type", "name"],
|
|
2918
|
+
"additionalProperties": false,
|
|
2919
|
+
"properties": {
|
|
2920
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
2921
|
+
"platform_type": { "type": "string", "enum": ["TelegramBot", "Wazzup", "Salebot", "SmsGorod", "VKon", "GetCourse", "WebWidget", "Bitrix24Bot"] },
|
|
2922
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 255 },
|
|
2923
|
+
"fields": { "type": "object", "description": "Публичные non-secret поля канала (per-type allowlist; секреты — на setup-странице). Напр. Wazzup={wazzup_channel}, GetCourse={getcourse_account_domain,...}, Bitrix24Bot={bitrix24_bot_name}." }
|
|
2924
|
+
}
|
|
2925
|
+
}
|
|
2926
|
+
},
|
|
2927
|
+
{
|
|
2928
|
+
"name": "besales_platform_create_status",
|
|
2929
|
+
"description": "v1.5 Increment 5b: статус platform provisioning сессии (polling по setup_ref; работает и для OAuth-сессий). status: AWAITING_USER → VALIDATING → READY (platform_id) | VALIDATION_FAILED (error_message) | EXPIRED. Scope: mcp:platform-setup.",
|
|
1063
2930
|
"inputSchema": {
|
|
1064
2931
|
"type": "object",
|
|
1065
|
-
"required": ["
|
|
2932
|
+
"required": ["setup_ref"],
|
|
2933
|
+
"additionalProperties": false,
|
|
1066
2934
|
"properties": {
|
|
1067
|
-
"
|
|
1068
|
-
"
|
|
1069
|
-
"explicit_confirmation": { "type": "boolean" },
|
|
1070
|
-
"confirmation_reason": { "type": "string" }
|
|
2935
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
2936
|
+
"setup_ref": { "type": "string", "minLength": 1 }
|
|
1071
2937
|
}
|
|
1072
2938
|
}
|
|
1073
2939
|
},
|
|
1074
2940
|
{
|
|
1075
|
-
"name": "
|
|
1076
|
-
"description": "
|
|
2941
|
+
"name": "besales_platform_create_oauth_init",
|
|
2942
|
+
"description": "v1.5 Increment 5b Phase 2: создать OAuth provisioning сессию (Instagram/Avito) через Setup URL pattern. Возвращает { setup_ref, auth_url, expires_at } — пользователь открывает auth_url в браузере и авторизуется у провайдера; код авторизации НЕ проходит через MCP/LLM. Затем polling через besales_platform_create_status. Требует настроенного провайдер-приложения (Meta App / Avito app). Scope: mcp:platform-setup.",
|
|
1077
2943
|
"inputSchema": {
|
|
1078
2944
|
"type": "object",
|
|
1079
|
-
"required": ["
|
|
2945
|
+
"required": ["platform_type"],
|
|
2946
|
+
"additionalProperties": false,
|
|
1080
2947
|
"properties": {
|
|
1081
|
-
"
|
|
1082
|
-
"
|
|
1083
|
-
"
|
|
1084
|
-
"confirmation_reason": { "type": "string" }
|
|
2948
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
2949
|
+
"platform_type": { "type": "string", "enum": ["Instagram", "Avito"] },
|
|
2950
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 255, "description": "Опционально: канал обычно сам именует платформу из подключённого аккаунта." }
|
|
1085
2951
|
}
|
|
1086
2952
|
}
|
|
1087
2953
|
},
|
|
1088
2954
|
{
|
|
1089
|
-
"name": "
|
|
1090
|
-
"description": "
|
|
2955
|
+
"name": "besales_crm_create_init",
|
|
2956
|
+
"description": "v1.5 Increment 5c: создать CRM provisioning сессию (Setup URL pattern). И секреты, И несекретные поля (sub_domain/client_id/domain/account_domain/...) вводит ЧЕЛОВЕК на setup-странице, минуя чат — параметр fields опционален (только pre-fill). GETCOURSE/TELEGRAM (API-key) + AMOCRM/BITRIX24 (AmoCRM — долгосрочный токен; Bitrix24 далее завершает local-app install вебхуком). Возвращает { setup_ref, setup_page_url, expires_at, required_secret_fields, required_non_secret_fields }. Детали — besales://workflows/connect-crm-from-scratch. Scope: mcp:platform-setup.",
|
|
1091
2957
|
"inputSchema": {
|
|
1092
2958
|
"type": "object",
|
|
1093
|
-
"required": ["
|
|
2959
|
+
"required": ["crm_type"],
|
|
2960
|
+
"additionalProperties": false,
|
|
1094
2961
|
"properties": {
|
|
1095
|
-
"
|
|
1096
|
-
"
|
|
2962
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
2963
|
+
"crm_type": { "type": "string", "enum": ["GETCOURSE", "TELEGRAM", "AMOCRM", "BITRIX24"] },
|
|
2964
|
+
"fields": { "type": "object", "description": "ОПЦИОНАЛЬНО (pre-fill). Несекретные поля можно НЕ передавать — человек введёт их на /setup/:ref вместе с секретами. Если передаёшь: GETCOURSE={account_domain, managed_tag_prefix?}; TELEGRAM={forum_group_id}; AMOCRM={sub_domain, client_id}; BITRIX24={domain, client_id}. Секреты — всегда на /setup/:ref, НЕ здесь." }
|
|
2965
|
+
}
|
|
2966
|
+
}
|
|
2967
|
+
},
|
|
2968
|
+
{
|
|
2969
|
+
"name": "besales_crm_create_status",
|
|
2970
|
+
"description": "v1.5 Increment 5c: статус CRM provisioning сессии (polling по setup_ref). status: AWAITING_USER → VALIDATING → READY (crm_id) | VALIDATION_FAILED | EXPIRED. AmoCRM на READY авто-активируется, если это единственная CRM workspace (иначе inactive → besales_crm_activate). Scope: mcp:platform-setup.",
|
|
2971
|
+
"inputSchema": {
|
|
2972
|
+
"type": "object",
|
|
2973
|
+
"required": ["setup_ref"],
|
|
2974
|
+
"additionalProperties": false,
|
|
2975
|
+
"properties": {
|
|
2976
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
2977
|
+
"setup_ref": { "type": "string", "minLength": 1 }
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
},
|
|
2981
|
+
{
|
|
2982
|
+
"name": "besales_crm_activate",
|
|
2983
|
+
"description": "Increment #3: активировать CRM (live-проверка токена + деактивация остальных CRM workspace + включение связанных триггеров). Активна одна CRM на workspace за раз — используй для переключения активной CRM или повторной активации после авто-отключения по 401. Битый/просроченный токен → ошибка активации. Scope: mcp:platform-setup.",
|
|
2984
|
+
"inputSchema": {
|
|
2985
|
+
"type": "object",
|
|
2986
|
+
"required": ["crm_id"],
|
|
2987
|
+
"additionalProperties": false,
|
|
2988
|
+
"properties": {
|
|
2989
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
2990
|
+
"crm_id": { "type": "string", "format": "uuid" }
|
|
2991
|
+
}
|
|
2992
|
+
}
|
|
2993
|
+
},
|
|
2994
|
+
{
|
|
2995
|
+
"name": "besales_crm_list",
|
|
2996
|
+
"description": "Список CRM workspace: id, type, status (active/inactive), is_active, account (поддомен AmoCRM / домен Bitrix24 / GetCourse), created_at. Пустой список → CRM не подключена (besales_crm_create_init). is_active=false → CRM есть, но не активна (besales_crm_activate) — объясняет, почему pipelines/field-mapping/operators могут не отвечать. Scope: mcp:platform-setup.",
|
|
2997
|
+
"inputSchema": {
|
|
2998
|
+
"type": "object",
|
|
2999
|
+
"required": [],
|
|
3000
|
+
"additionalProperties": false,
|
|
3001
|
+
"properties": {
|
|
3002
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." }
|
|
3003
|
+
}
|
|
3004
|
+
}
|
|
3005
|
+
},
|
|
3006
|
+
{
|
|
3007
|
+
"name": "besales_crm_field_mapping_get",
|
|
3008
|
+
"description": "v1.5 Increment 5c: текущий маппинг полей CRM + доступные поля. Только AmoCRM/Bitrix24 (иначе unsupported_reason). Scope: mcp:platform-setup.",
|
|
3009
|
+
"inputSchema": {
|
|
3010
|
+
"type": "object",
|
|
3011
|
+
"required": ["crm_id"],
|
|
3012
|
+
"additionalProperties": false,
|
|
3013
|
+
"properties": {
|
|
3014
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
3015
|
+
"crm_id": { "type": "string", "format": "uuid" }
|
|
3016
|
+
}
|
|
3017
|
+
}
|
|
3018
|
+
},
|
|
3019
|
+
{
|
|
3020
|
+
"name": "besales_crm_field_mapping_upsert",
|
|
3021
|
+
"description": "v1.5 Increment 5c: заменить маппинг полей CRM (replace-all semantics — передаётся весь набор). Только AmoCRM/Bitrix24 (иначе unsupported_reason). Scope: mcp:platform-setup.",
|
|
3022
|
+
"inputSchema": {
|
|
3023
|
+
"type": "object",
|
|
3024
|
+
"required": ["crm_id", "replace_all_existing", "enabled", "field_mappings"],
|
|
3025
|
+
"additionalProperties": false,
|
|
3026
|
+
"properties": {
|
|
3027
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
3028
|
+
"crm_id": { "type": "string", "format": "uuid" },
|
|
3029
|
+
"replace_all_existing": { "const": true },
|
|
3030
|
+
"enabled": { "type": "boolean" },
|
|
3031
|
+
"field_mappings": {
|
|
3032
|
+
"type": "array",
|
|
3033
|
+
"items": {
|
|
3034
|
+
"type": "object",
|
|
3035
|
+
"additionalProperties": false,
|
|
3036
|
+
"required": ["crm_field_id", "save_as", "enabled"],
|
|
3037
|
+
"properties": {
|
|
3038
|
+
"crm_field_id": { "type": "string", "minLength": 1 },
|
|
3039
|
+
"crm_field_name": { "type": "string" },
|
|
3040
|
+
"save_as": { "type": "string", "minLength": 1 },
|
|
3041
|
+
"enabled": { "type": "boolean" },
|
|
3042
|
+
"special_purpose": { "type": "string", "enum": ["phone", "telegramId", "username", "avitoId", "instagramId", "vkonId"] },
|
|
3043
|
+
"category": { "type": "string" }
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
},
|
|
3050
|
+
{
|
|
3051
|
+
"name": "besales_crm_operator_list",
|
|
3052
|
+
"description": "v1.5 Increment 5c: список операторов CRM (для assignee-стратегий PipelineSettings). Только AmoCRM/Bitrix24 (иначе unsupported_reason). sync=true пересинхронизирует. Scope: mcp:platform-setup.",
|
|
3053
|
+
"inputSchema": {
|
|
3054
|
+
"type": "object",
|
|
3055
|
+
"required": ["crm_id"],
|
|
3056
|
+
"additionalProperties": false,
|
|
3057
|
+
"properties": {
|
|
3058
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
3059
|
+
"crm_id": { "type": "string", "format": "uuid" },
|
|
3060
|
+
"sync": { "type": "boolean" }
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
},
|
|
3064
|
+
{
|
|
3065
|
+
"name": "besales_crm_operator_update",
|
|
3066
|
+
"description": "v1.5 Increment 5c: вкл/выкл роли конкретного оператора CRM (is_operator — assignee диалогов, и/или is_sdr). Передаётся хотя бы один флаг; не указанный сохраняет текущее значение. Только AmoCRM/Bitrix24 (иначе unsupported_reason). Scope: mcp:platform-setup.",
|
|
3067
|
+
"inputSchema": {
|
|
3068
|
+
"type": "object",
|
|
3069
|
+
"required": ["crm_id", "operator_id"],
|
|
3070
|
+
"additionalProperties": false,
|
|
3071
|
+
"properties": {
|
|
3072
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
3073
|
+
"crm_id": { "type": "string", "format": "uuid" },
|
|
3074
|
+
"operator_id": { "type": "string", "format": "uuid" },
|
|
3075
|
+
"is_operator": { "type": "boolean" },
|
|
3076
|
+
"is_sdr": { "type": "boolean" }
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
},
|
|
3080
|
+
{
|
|
3081
|
+
"name": "besales_datasource_create_init",
|
|
3082
|
+
"description": "v1.5 Increment 4f: создать data-source (1С) provisioning-сессию (Setup URL pattern). Пароль OData и несекретные поля (name/base_url/username/proxy_url?) вводит ЧЕЛОВЕК на /setup/:ref, минуя чат — fields опционален (pre-fill). Возвращает { setup_ref, setup_page_url, expires_at, required_secret_fields, required_non_secret_fields }. 1С — товарная БД (категория «БД»), доступ через OData; читает/пишет агент через ДЕЙСТВИЯ ТРИГГЕРОВ, не через tools. Scope: mcp:platform-setup.",
|
|
3083
|
+
"inputSchema": {
|
|
3084
|
+
"type": "object",
|
|
3085
|
+
"required": ["data_source_type"],
|
|
3086
|
+
"additionalProperties": false,
|
|
3087
|
+
"properties": {
|
|
3088
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
3089
|
+
"data_source_type": { "type": "string", "enum": ["ONE_C"] },
|
|
3090
|
+
"fields": { "type": "object", "description": "ОПЦИОНАЛЬНО (pre-fill). Несекретные поля можно НЕ передавать — человек введёт на /setup/:ref вместе с паролем. Если передаёшь: { name, base_url, username, proxy_url? }. Пароль — всегда на /setup/:ref, НЕ здесь." }
|
|
3091
|
+
}
|
|
3092
|
+
}
|
|
3093
|
+
},
|
|
3094
|
+
{
|
|
3095
|
+
"name": "besales_datasource_create_status",
|
|
3096
|
+
"description": "v1.5 Increment 4f: статус data-source provisioning-сессии по setup_ref. AWAITING_USER → VALIDATING → READY (data_source_id) | VALIDATION_FAILED (error_message) | EXPIRED. Scope: mcp:platform-setup.",
|
|
3097
|
+
"inputSchema": {
|
|
3098
|
+
"type": "object",
|
|
3099
|
+
"required": ["setup_ref"],
|
|
3100
|
+
"additionalProperties": false,
|
|
3101
|
+
"properties": {
|
|
3102
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
3103
|
+
"setup_ref": { "type": "string", "description": "Идентификатор сессии из besales_datasource_create_init." }
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
},
|
|
3107
|
+
{
|
|
3108
|
+
"name": "besales_datasource_list",
|
|
3109
|
+
"description": "v1.5 Increment 4f: список подключений data-source (1С) воркспейса: id, type, name, status (ACTIVE/ERROR/INACTIVE), enabled, base_url. Read-only. Scope: mcp:platform-setup.",
|
|
3110
|
+
"inputSchema": {
|
|
3111
|
+
"type": "object",
|
|
3112
|
+
"required": [],
|
|
3113
|
+
"additionalProperties": false,
|
|
3114
|
+
"properties": {
|
|
3115
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." }
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
},
|
|
3119
|
+
{
|
|
3120
|
+
"name": "besales_datasource_health",
|
|
3121
|
+
"description": "v1.5 Increment 4f: live health-check подключения 1С (ok=true → OData отвечает, статус → ACTIVE). Scope: mcp:platform-setup.",
|
|
3122
|
+
"inputSchema": {
|
|
3123
|
+
"type": "object",
|
|
3124
|
+
"required": ["data_source_id"],
|
|
3125
|
+
"additionalProperties": false,
|
|
3126
|
+
"properties": {
|
|
3127
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
3128
|
+
"data_source_id": { "type": "string", "format": "uuid" }
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3131
|
+
},
|
|
3132
|
+
{
|
|
3133
|
+
"name": "besales_datasource_catalogs",
|
|
3134
|
+
"description": "v1.5 Increment 4f: объекты 1С из $metadata (external_code, display_name, kind: catalog/document/register) для назначения ролей. Scope: mcp:platform-setup.",
|
|
3135
|
+
"inputSchema": {
|
|
3136
|
+
"type": "object",
|
|
3137
|
+
"required": ["data_source_id"],
|
|
3138
|
+
"additionalProperties": false,
|
|
3139
|
+
"properties": {
|
|
3140
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
3141
|
+
"data_source_id": { "type": "string", "format": "uuid" }
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
"name": "besales_datasource_catalog_roles",
|
|
3147
|
+
"description": "v1.5 Increment 4f: назначенные роли объектов 1С + флаг vectorized (включена ли векторизация каталога товаров). Read-only. Scope: mcp:platform-setup.",
|
|
3148
|
+
"inputSchema": {
|
|
3149
|
+
"type": "object",
|
|
3150
|
+
"required": ["data_source_id"],
|
|
3151
|
+
"additionalProperties": false,
|
|
3152
|
+
"properties": {
|
|
3153
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
3154
|
+
"data_source_id": { "type": "string", "format": "uuid" }
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
3157
|
+
},
|
|
3158
|
+
{
|
|
3159
|
+
"name": "besales_datasource_role_assign",
|
|
3160
|
+
"description": "v1.5 Increment 4f: назначить роль объекту 1С (one-role-per-object: прежние роли объекта снимаются). PRODUCT_CATALOG — товары; STOCK/PRICE — регистры остатков/цен (metadata.register.virtualTable=Balance/SliceLast); ORDER/CUSTOMER/OTHER. Scope: mcp:platform-setup.",
|
|
3161
|
+
"inputSchema": {
|
|
3162
|
+
"type": "object",
|
|
3163
|
+
"required": ["data_source_id", "role", "external_code", "display_name"],
|
|
3164
|
+
"additionalProperties": false,
|
|
3165
|
+
"properties": {
|
|
3166
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
3167
|
+
"data_source_id": { "type": "string", "format": "uuid" },
|
|
3168
|
+
"role": { "type": "string", "enum": ["PRODUCT_CATALOG", "STOCK", "PRICE", "ORDER", "CUSTOMER", "OTHER"] },
|
|
3169
|
+
"external_code": { "type": "string", "description": "external_code объекта из besales_datasource_catalogs." },
|
|
3170
|
+
"display_name": { "type": "string" },
|
|
3171
|
+
"metadata": { "type": "object", "description": "Опц. Для регистров STOCK/PRICE: { register: { virtualTable: \"Balance\" | \"SliceLast\" } }." }
|
|
3172
|
+
}
|
|
3173
|
+
}
|
|
3174
|
+
},
|
|
3175
|
+
{
|
|
3176
|
+
"name": "besales_datasource_enable",
|
|
3177
|
+
"description": "v1.5 Increment 4f: вкл/выкл подключение 1С (намерение). Выключенное НЕ используется действиями триггеров, даже если OData доступна. Scope: mcp:platform-setup.",
|
|
3178
|
+
"inputSchema": {
|
|
3179
|
+
"type": "object",
|
|
3180
|
+
"required": ["data_source_id", "enabled"],
|
|
3181
|
+
"additionalProperties": false,
|
|
3182
|
+
"properties": {
|
|
3183
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
3184
|
+
"data_source_id": { "type": "string", "format": "uuid" },
|
|
3185
|
+
"enabled": { "type": "boolean" }
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
"name": "besales_datasource_vectorize",
|
|
3191
|
+
"description": "v1.5 Increment 4f: вкл/выкл семантический поиск по каталогу товаров 1С (роль PRODUCT_CATALOG): вкл → синк в Pinecone; выкл → удаление векторов. Требует объект с ролью PRODUCT_CATALOG + ACTIVE-подключение. Scope: mcp:platform-setup.",
|
|
3192
|
+
"inputSchema": {
|
|
3193
|
+
"type": "object",
|
|
3194
|
+
"required": ["data_source_id", "catalog_external_code", "enabled"],
|
|
3195
|
+
"additionalProperties": false,
|
|
3196
|
+
"properties": {
|
|
3197
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "Optional override. Normally omit — defaults to the workspace bound to this session (BESALES_WORKSPACE_ID or active connection)." },
|
|
3198
|
+
"data_source_id": { "type": "string", "format": "uuid" },
|
|
3199
|
+
"catalog_external_code": { "type": "string" },
|
|
3200
|
+
"enabled": { "type": "boolean" },
|
|
3201
|
+
"name": { "type": "string", "description": "Опц. имя векторной таблицы при включении." }
|
|
3202
|
+
}
|
|
3203
|
+
}
|
|
3204
|
+
},
|
|
3205
|
+
{
|
|
3206
|
+
"name": "besales_workspace_use",
|
|
3207
|
+
"description": "Привязать ТЕКУЩУЮ Claude-сессию к воркспейсу (in-memory, до конца сессии). Для GUI-хостов (Claude Desktop), где нельзя задать env на сессию: если подключено несколько воркспейсов — этим тулом биндишь сессию к нужному, не трогая другие сессии и keychain `active`. workspace_id бери из besales_workspace_current. Запрещён, если сессия запиннена через BESALES_WORKSPACE_ID.",
|
|
3208
|
+
"inputSchema": {
|
|
3209
|
+
"type": "object",
|
|
3210
|
+
"required": ["workspace_id"],
|
|
3211
|
+
"properties": {
|
|
3212
|
+
"workspace_id": { "type": "string", "format": "uuid", "description": "UUID подключённого воркспейса (см. besales_workspace_current.connected[].workspace_id)." }
|
|
3213
|
+
}
|
|
3214
|
+
}
|
|
3215
|
+
},
|
|
3216
|
+
{
|
|
3217
|
+
"name": "besales_workspace_current",
|
|
3218
|
+
"description": "Показать воркспейс текущей сессии (+ source: env/session/active/sole/none) и список всех подключённых воркспейсов. Read-only, без обращения к backend. Зови перед besales_workspace_use, чтобы узнать доступные workspace_id.",
|
|
3219
|
+
"inputSchema": {
|
|
3220
|
+
"type": "object",
|
|
3221
|
+
"required": [],
|
|
3222
|
+
"properties": {}
|
|
3223
|
+
}
|
|
3224
|
+
},
|
|
3225
|
+
{
|
|
3226
|
+
"name": "besales_model_catalog_list",
|
|
3227
|
+
"description": "Каталог моделей для сравнения промпта (model bake-off): id, label, tier (budget/balanced/premium), bestFor-теги «когда что лучше», notes, viaOpenRouter, defaultSelected, available (доступен ли провайдер сейчас) + лимиты. По этим тегам ИИ выбирает ~5 моделей под use-case агента. Read-only.",
|
|
3228
|
+
"inputSchema": {
|
|
3229
|
+
"type": "object",
|
|
3230
|
+
"required": [],
|
|
3231
|
+
"additionalProperties": false,
|
|
3232
|
+
"properties": {}
|
|
3233
|
+
}
|
|
3234
|
+
},
|
|
3235
|
+
{
|
|
3236
|
+
"name": "besales_model_comparison_run_start",
|
|
3237
|
+
"description": "Запустить прогон сравнения промпта агента на нескольких моделях (один и тот же набор диалогов, меняется только модель агента). ДОРОГО — только по явному запросу оператора, НЕ после каждого фикса. models опционально (по умолчанию ~5 defaultSelected из besales_model_catalog_list), 1..10. dialogue_count по умолчанию 5, до 20. Возвращает run_id для besales_model_comparison_get.",
|
|
3238
|
+
"inputSchema": {
|
|
3239
|
+
"type": "object",
|
|
3240
|
+
"required": ["agent_id"],
|
|
3241
|
+
"additionalProperties": false,
|
|
3242
|
+
"properties": {
|
|
3243
|
+
"agent_id": { "type": "string", "format": "uuid" },
|
|
3244
|
+
"models": { "type": "array", "items": { "type": "string" }, "minItems": 1, "maxItems": 10, "description": "Runnable id моделей из каталога (1..10). По умолчанию набор defaultSelected." },
|
|
3245
|
+
"dialogue_count": { "type": "integer", "minimum": 1, "maximum": 20, "description": "Диалогов на модель (по умолчанию 5)." },
|
|
3246
|
+
"message_direction": { "type": "string", "enum": ["INBOUND", "OUTBOUND"] }
|
|
3247
|
+
}
|
|
3248
|
+
}
|
|
3249
|
+
},
|
|
3250
|
+
{
|
|
3251
|
+
"name": "besales_model_comparison_get",
|
|
3252
|
+
"description": "Статус + результаты прогона сравнения: по каждой модели — диалоги + детерминированные метрики (стоимость-кредиты, длина ответа, completion, wall-clock) + сохранённый eval. Прочитай, оцени какая модель лучше по метрикам И качеству диалогов, ответь оператору с аргументами и выдержками, затем besales_model_comparison_eval_submit.",
|
|
3253
|
+
"inputSchema": {
|
|
3254
|
+
"type": "object",
|
|
3255
|
+
"required": ["run_id"],
|
|
3256
|
+
"additionalProperties": false,
|
|
3257
|
+
"properties": {
|
|
3258
|
+
"run_id": { "type": "string", "format": "uuid" }
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
},
|
|
3262
|
+
{
|
|
3263
|
+
"name": "besales_model_comparison_eval_submit",
|
|
3264
|
+
"description": "Записать вердикт ИИ по прогону (replace при повторе): победитель + обоснование + по каждой модели success_score (0-100), сильные/слабые стороны, выдержки из диалогов. Сохраняется для будущего UI. ИИ всё равно отвечает оператору в чате — submit фиксирует структуру.",
|
|
3265
|
+
"inputSchema": {
|
|
3266
|
+
"type": "object",
|
|
3267
|
+
"required": ["run_id", "winner", "rationale", "per_model"],
|
|
3268
|
+
"additionalProperties": false,
|
|
3269
|
+
"properties": {
|
|
3270
|
+
"run_id": { "type": "string", "format": "uuid" },
|
|
3271
|
+
"winner": { "type": "string", "description": "Runnable id модели-победителя." },
|
|
3272
|
+
"rationale": { "type": "string" },
|
|
3273
|
+
"per_model": {
|
|
3274
|
+
"type": "array",
|
|
3275
|
+
"minItems": 1,
|
|
3276
|
+
"items": {
|
|
3277
|
+
"type": "object",
|
|
3278
|
+
"required": ["model", "success_score", "strengths", "weaknesses", "excerpts"],
|
|
3279
|
+
"additionalProperties": false,
|
|
3280
|
+
"properties": {
|
|
3281
|
+
"model": { "type": "string" },
|
|
3282
|
+
"success_score": { "type": "integer", "minimum": 0, "maximum": 100 },
|
|
3283
|
+
"strengths": { "type": "array", "items": { "type": "string" } },
|
|
3284
|
+
"weaknesses": { "type": "array", "items": { "type": "string" } },
|
|
3285
|
+
"excerpts": { "type": "array", "items": { "type": "string" } }
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
1097
3289
|
}
|
|
1098
3290
|
}
|
|
1099
3291
|
}
|
|
@@ -1128,26 +3320,157 @@
|
|
|
1128
3320
|
"name": "External Execution Pattern (NEW v3.1)",
|
|
1129
3321
|
"description": "Как работает 2-step pattern instructions/submit для LLM операций. Когда использовать external vs internal mode.",
|
|
1130
3322
|
"mimeType": "text/markdown"
|
|
3323
|
+
},
|
|
3324
|
+
{
|
|
3325
|
+
"uri": "besales://concepts/feedback-sheets",
|
|
3326
|
+
"name": "Google Sheets Feedback Integration",
|
|
3327
|
+
"description": "Как привязывать Google Sheets-таблицы с замечаниями тестировщиков к промпту и читать их для улучшения промпта.",
|
|
3328
|
+
"mimeType": "text/markdown"
|
|
3329
|
+
},
|
|
3330
|
+
{
|
|
3331
|
+
"uri": "besales://concepts/workbook-classification",
|
|
3332
|
+
"name": "Workbook Ingestion & Classification (v1.5)",
|
|
3333
|
+
"description": "Как Claude Code раскладывает многотабличные xlsx / Google Sheets источники по слоям (prompt / facts / knowledge / ICP). Open-ended таксономия типов вкладок, regex patterns для amoCRM, правила про параллельные колонки и роутер.",
|
|
3334
|
+
"mimeType": "text/markdown"
|
|
3335
|
+
},
|
|
3336
|
+
{
|
|
3337
|
+
"uri": "besales://workflows/platform-setup-from-scratch",
|
|
3338
|
+
"name": "Workflow: Platform Setup From Scratch (v1.5 Increment 6a)",
|
|
3339
|
+
"description": "Backbone happy-path настройки с нуля по 6-фазной модели: 1 Connect (wait READY) → 2 Discover (компания+ICP) → 3 Author (скрипт+тест-сценарии) → 4 Build&Prove (агент+промпт+sandbox+модель) → 5 Enrich (RAG+поведение+триггеры) → 6 Activate (воронка+операторы+follow-ups) → production-check. Фазы — ориентир, фаза 1 — единственный async gate.",
|
|
3340
|
+
"mimeType": "text/markdown"
|
|
3341
|
+
},
|
|
3342
|
+
{
|
|
3343
|
+
"uri": "besales://workflows/connect-crm-from-scratch",
|
|
3344
|
+
"name": "Workflow: Connect CRM From Scratch",
|
|
3345
|
+
"description": "Операционные шаги подключения CRM через MCP (AmoCRM долгосрочным токеном, Bitrix24, GetCourse, Telegram): где взять sub_domain/client_id/секреты, какие scopes для выгрузки аудио-звонков, активация (auto + besales_crm_activate). Source of truth для credentials — не ищи в исходниках платформы.",
|
|
3346
|
+
"mimeType": "text/markdown"
|
|
3347
|
+
},
|
|
3348
|
+
{
|
|
3349
|
+
"uri": "besales://workflows/connect-datasource-from-scratch",
|
|
3350
|
+
"name": "Workflow: Connect Data Source (1С) From Scratch",
|
|
3351
|
+
"description": "Операционные шаги подключения 1С (товарная БД через OData) через MCP: create_init → /setup (пароль) → poll до READY → роли объектов (PRODUCT_CATALOG/STOCK/PRICE/ORDER/CUSTOMER) → векторизация каталога → чтение/запись в диалоге через besales_trigger_upsert (DATA_SOURCE_READ/WRITE). Категория «БД», не CRM. Source of truth — не ищи в исходниках.",
|
|
3352
|
+
"mimeType": "text/markdown"
|
|
3353
|
+
},
|
|
3354
|
+
{
|
|
3355
|
+
"uri": "besales://workflows/extract-from-document",
|
|
3356
|
+
"name": "Workflow: Extract From Document (v1.5 Increment 6a)",
|
|
3357
|
+
"description": "Документ от пользователя → триаж и fan-out по нескольким целям сразу (ICP / knowledge Q&A / tables / variables / behavior). Один источник часто питает 2-3 цели.",
|
|
3358
|
+
"mimeType": "text/markdown"
|
|
3359
|
+
},
|
|
3360
|
+
{
|
|
3361
|
+
"uri": "besales://workflows/iterate-with-sandbox",
|
|
3362
|
+
"name": "Workflow: Iterate With Sandbox (v1.5 Increment 6a)",
|
|
3363
|
+
"description": "Цикл улучшения промпта/поведения: sandbox run → findings (external execution) → правки через prompt_patch_* → повторный прогон. Когда останавливаться.",
|
|
3364
|
+
"mimeType": "text/markdown"
|
|
3365
|
+
},
|
|
3366
|
+
{
|
|
3367
|
+
"uri": "besales://workflows/production-readiness-check",
|
|
3368
|
+
"name": "Workflow: Production Readiness Check (v1.5 Increment 6a)",
|
|
3369
|
+
"description": "Чеклист перед запуском, опираясь на setupCompleteness: канал READY+isAiEnabled, агент с промптом, knowledge привязан к каналу, sandbox прогнан, CRM (если есть). Готово/недоделано.",
|
|
3370
|
+
"mimeType": "text/markdown"
|
|
3371
|
+
},
|
|
3372
|
+
{
|
|
3373
|
+
"uri": "besales://docs/prompt-anatomy",
|
|
3374
|
+
"name": "Doc: Prompt Anatomy (v1.5 Increment 6b)",
|
|
3375
|
+
"description": "Из чего собирается системный промпт, в каком порядке. Что нужно сгенерировать в baseSystemPrompt, а что система добавляет автоматически.",
|
|
3376
|
+
"mimeType": "text/markdown"
|
|
3377
|
+
},
|
|
3378
|
+
{
|
|
3379
|
+
"uri": "besales://docs/knowledge-base",
|
|
3380
|
+
"name": "Doc: Knowledge Base (v1.5 Increment 6b)",
|
|
3381
|
+
"description": "База знаний Animaly. Namespaces (qa/doc/web/table), QA, RAG-поиск, Pinecone. Конфигурация и привязка к агентам.",
|
|
3382
|
+
"mimeType": "text/markdown"
|
|
3383
|
+
},
|
|
3384
|
+
{
|
|
3385
|
+
"uri": "besales://docs/agent-behavior",
|
|
3386
|
+
"name": "Doc: Agent Behavior (v1.5 Increment 6b)",
|
|
3387
|
+
"description": "AgentBehavior — настройки поведения для всей платформы. Задержки, фильтры текста, кнопки приветствия, обработка медиа, расписание оператора.",
|
|
3388
|
+
"mimeType": "text/markdown"
|
|
3389
|
+
},
|
|
3390
|
+
{
|
|
3391
|
+
"uri": "besales://docs/platforms",
|
|
3392
|
+
"name": "Doc: Platforms / Channels (v1.5 Increment 6b)",
|
|
3393
|
+
"description": "11 каналов связи Animaly. Конфигурация, обязательные поля, лимиты, поддерживаемые фичи (кнопки, медиа, group chats).",
|
|
3394
|
+
"mimeType": "text/markdown"
|
|
3395
|
+
},
|
|
3396
|
+
{
|
|
3397
|
+
"uri": "besales://docs/crm-integration",
|
|
3398
|
+
"name": "Doc: CRM Integration (v1.5 Increment 6b)",
|
|
3399
|
+
"description": "CRM в Animaly — AmoCRM, Bitrix24, Telegram Forum, GetCourse. Воронки, статусы, маппинг полей, специальные поля, конвертация лидов.",
|
|
3400
|
+
"mimeType": "text/markdown"
|
|
3401
|
+
},
|
|
3402
|
+
{
|
|
3403
|
+
"uri": "besales://docs/pipeline-builder",
|
|
3404
|
+
"name": "Doc: Pipeline Builder (v1.5 Increment 6b)",
|
|
3405
|
+
"description": "Pipeline Builder — настройка фильтрации существующих сделок и автоматических переходов между этапами CRM. PipelineSettings, status movement, statusTypes.",
|
|
3406
|
+
"mimeType": "text/markdown"
|
|
3407
|
+
},
|
|
3408
|
+
{
|
|
3409
|
+
"uri": "besales://docs/files-and-uploads",
|
|
3410
|
+
"name": "Doc: Files & Uploads (v1.5 Increment 6b)",
|
|
3411
|
+
"description": "Управление файлами в Animaly. StoredFile, FileSection (разделы библиотеки), source-категории, использование в send_pic, follow-up, кампаниях, warmup.",
|
|
3412
|
+
"mimeType": "text/markdown"
|
|
3413
|
+
},
|
|
3414
|
+
{
|
|
3415
|
+
"uri": "besales://docs/pipeline-settings-deep",
|
|
3416
|
+
"name": "Doc: Pipeline Settings Deep (v1.5 Increment 6b)",
|
|
3417
|
+
"description": "Полная схема PipelineSettings — фильтры поиска существующих сделок (3 режима), 6 настроек автоперемещения статусов, флаги создания новых лидов/контактов, глобальные правила. Связь с PlatformPipeline.",
|
|
3418
|
+
"mimeType": "text/markdown"
|
|
3419
|
+
},
|
|
3420
|
+
{
|
|
3421
|
+
"uri": "besales://docs/prompt-principles",
|
|
3422
|
+
"name": "Doc: Prompt Principles — humanization + sales playbook (reusable)",
|
|
3423
|
+
"description": "Переиспользуемые принципы написания промптов (любая компания). Раздел A — человечность / анти-AI-tell для любого агента: без длинного тире, без приторных филлеров («спокойно», «по-человечески»), живой язык вместо канцелярита, бренд на языке клиента, без повторов, без меню-рефлекса, честный отказ с альтернативой, конкретное действие. Раздел B — sales/outbound/reactivation-плейбук: опенер от триггера, КВАЛИФИКАЦИЯ перед передачей (отсев, а не «всех на менеджера»), плавный хендофф без анкеты, не рваться к оплате. Сверяйся при генерации И правке baseSystemPrompt.",
|
|
3424
|
+
"mimeType": "text/markdown"
|
|
3425
|
+
},
|
|
3426
|
+
{
|
|
3427
|
+
"uri": "besales://workflows/compare-models",
|
|
3428
|
+
"name": "Workflow: Compare models (model bake-off)",
|
|
3429
|
+
"description": "Маршрут прогона сравнения промпта на нескольких моделях: читай besales_model_catalog_list → выбери ~5 по bestFor под use-case агента → besales_model_comparison_run_start (по умолчанию 5 диалогов) → поллируй besales_model_comparison_get → суди по метрикам + диалогам → ответь оператору с аргументами и выдержками → besales_model_comparison_eval_submit. По запросу, дорого, НЕ после каждого фикса.",
|
|
3430
|
+
"mimeType": "text/markdown"
|
|
1131
3431
|
}
|
|
1132
3432
|
],
|
|
1133
3433
|
"summary": {
|
|
1134
|
-
"total_tools":
|
|
3434
|
+
"total_tools": 130,
|
|
1135
3435
|
"tools_by_category": {
|
|
3436
|
+
"files_upload": 3,
|
|
3437
|
+
"platform_provisioning": 3,
|
|
3438
|
+
"crm_provisioning": 6,
|
|
3439
|
+
"data_sources": 9,
|
|
3440
|
+
"workspace_overview": 1,
|
|
3441
|
+
"icp_management": 3,
|
|
1136
3442
|
"icp_external_execution": 2,
|
|
3443
|
+
"icp_read": 4,
|
|
3444
|
+
"test_scenario_generation_external": 2,
|
|
1137
3445
|
"prompt_generation_external": 2,
|
|
1138
|
-
"prompt_iteration_external": 2,
|
|
1139
3446
|
"prompt_analysis_external": 2,
|
|
1140
3447
|
"prompt_finalize": 1,
|
|
1141
3448
|
"sandbox_run_start": 1,
|
|
1142
3449
|
"sandbox_findings_external": 2,
|
|
1143
3450
|
"simulation_findings_external": 2,
|
|
1144
3451
|
"qa_generation_external": 2,
|
|
1145
|
-
"platform_setup_bridge": 13
|
|
3452
|
+
"platform_setup_bridge": 13,
|
|
3453
|
+
"feedback_sheets": 5,
|
|
3454
|
+
"facts_management": 2,
|
|
3455
|
+
"prompt_lint_standalone": 1,
|
|
3456
|
+
"prompt_drafts": 5,
|
|
3457
|
+
"workbook_ingestion": 3,
|
|
3458
|
+
"knowledge_spaces": 6,
|
|
3459
|
+
"knowledge_documents": 4,
|
|
3460
|
+
"knowledge_qa": 7,
|
|
3461
|
+
"knowledge_websites": 4,
|
|
3462
|
+
"knowledge_tables": 6,
|
|
3463
|
+
"variables": 5,
|
|
3464
|
+
"crm_pipelines": 11,
|
|
3465
|
+
"platform_clone": 3,
|
|
3466
|
+
"session_workspace": 2,
|
|
3467
|
+
"model_comparison": 4,
|
|
3468
|
+
"dialog_script": 2
|
|
1146
3469
|
},
|
|
1147
3470
|
"external_execution_pairs": [
|
|
1148
3471
|
"besales_icp_analysis_get_instructions / submit",
|
|
3472
|
+
"besales_test_scenario_generate_get_instructions / submit",
|
|
1149
3473
|
"besales_prompt_generate_get_instructions / submit",
|
|
1150
|
-
"besales_prompt_iterate_get_instructions / submit",
|
|
1151
3474
|
"besales_prompt_analyze_get_instructions / submit",
|
|
1152
3475
|
"besales_sandbox_findings_get_instructions / submit",
|
|
1153
3476
|
"besales_simulation_findings_get_instructions / submit",
|
|
@@ -1161,6 +3484,10 @@
|
|
|
1161
3484
|
"besales_qa_generation_get_instructions",
|
|
1162
3485
|
"besales_qa_generation_submit"
|
|
1163
3486
|
],
|
|
3487
|
+
"newly_added_in_p3_5_test_scenario_generation": [
|
|
3488
|
+
"besales_test_scenario_generate_get_instructions",
|
|
3489
|
+
"besales_test_scenario_generate_submit"
|
|
3490
|
+
],
|
|
1164
3491
|
"newly_added_in_p3_x_platform_setup_bridge": [
|
|
1165
3492
|
"besales_platform_context_get",
|
|
1166
3493
|
"besales_agent_list",
|
|
@@ -1176,6 +3503,133 @@
|
|
|
1176
3503
|
"besales_platform_settings_update",
|
|
1177
3504
|
"besales_audit_revert"
|
|
1178
3505
|
],
|
|
3506
|
+
"newly_added_in_v1_5_07_feedback_sheets": [
|
|
3507
|
+
"besales_feedback_sheet_link",
|
|
3508
|
+
"besales_feedback_sheet_list",
|
|
3509
|
+
"besales_feedback_sheet_read",
|
|
3510
|
+
"besales_feedback_sheet_unlink",
|
|
3511
|
+
"besales_feedback_sheet_row_update"
|
|
3512
|
+
],
|
|
3513
|
+
"newly_added_in_v1_5_s4_13_facts_classify_and_migrate": [
|
|
3514
|
+
"besales_facts_classify_and_migrate"
|
|
3515
|
+
],
|
|
3516
|
+
"newly_added_in_v1_5_pipeline_rules_extras": [
|
|
3517
|
+
"besales_agent_facts_set",
|
|
3518
|
+
"besales_prompt_lint"
|
|
3519
|
+
],
|
|
3520
|
+
"newly_added_in_v1_5_s3_8_patch_drafts": [
|
|
3521
|
+
"besales_prompt_patch_start",
|
|
3522
|
+
"besales_prompt_patch_get",
|
|
3523
|
+
"besales_prompt_patch_apply",
|
|
3524
|
+
"besales_prompt_patch_commit",
|
|
3525
|
+
"besales_prompt_patch_discard"
|
|
3526
|
+
],
|
|
3527
|
+
"newly_added_in_v1_5_workspace_overview": [
|
|
3528
|
+
"besales_workspace_overview"
|
|
3529
|
+
],
|
|
3530
|
+
"newly_added_in_v1_5_workbook_ingestion": [
|
|
3531
|
+
"besales_workbook_inspect",
|
|
3532
|
+
"besales_workbook_extract_amocrm_leads",
|
|
3533
|
+
"besales_workbook_to_knowledge_document"
|
|
3534
|
+
],
|
|
3535
|
+
"newly_added_in_v1_5_knowledge_ingestion": [
|
|
3536
|
+
"besales_knowledge_space_create",
|
|
3537
|
+
"besales_knowledge_space_list",
|
|
3538
|
+
"besales_knowledge_space_get",
|
|
3539
|
+
"besales_knowledge_space_patch",
|
|
3540
|
+
"besales_knowledge_space_channel_link_upsert",
|
|
3541
|
+
"besales_knowledge_space_channel_link_remove",
|
|
3542
|
+
"besales_knowledge_document_upload",
|
|
3543
|
+
"besales_knowledge_document_list",
|
|
3544
|
+
"besales_knowledge_document_get",
|
|
3545
|
+
"besales_knowledge_document_delete"
|
|
3546
|
+
],
|
|
3547
|
+
"newly_added_in_v1_5_increment_3": [
|
|
3548
|
+
"besales_knowledge_table_link",
|
|
3549
|
+
"besales_knowledge_table_list",
|
|
3550
|
+
"besales_knowledge_table_get",
|
|
3551
|
+
"besales_knowledge_table_patch",
|
|
3552
|
+
"besales_knowledge_table_delete",
|
|
3553
|
+
"besales_knowledge_table_reindex"
|
|
3554
|
+
],
|
|
3555
|
+
"modified_in_v1_5_increment_3": [
|
|
3556
|
+
"besales_agent_update",
|
|
3557
|
+
"besales_behavior_update",
|
|
3558
|
+
"besales_platform_settings_update",
|
|
3559
|
+
"besales_pipeline_settings_update"
|
|
3560
|
+
],
|
|
3561
|
+
"removed_in_phase_b_2026_05_27": [
|
|
3562
|
+
"besales_agent_legacy_self_analysis_set"
|
|
3563
|
+
],
|
|
3564
|
+
"hard_break_in_phase_b_2026_05_27": {
|
|
3565
|
+
"besales_behavior_update": "generic `updates` field удалён",
|
|
3566
|
+
"besales_pipeline_settings_update": "generic `updates` field удалён",
|
|
3567
|
+
"besales_platform_settings_update": "generic `settings` field удалён"
|
|
3568
|
+
},
|
|
3569
|
+
"newly_added_in_v1_5_increment_2": [
|
|
3570
|
+
"besales_knowledge_qa_create",
|
|
3571
|
+
"besales_knowledge_qa_list",
|
|
3572
|
+
"besales_knowledge_qa_get",
|
|
3573
|
+
"besales_knowledge_qa_patch",
|
|
3574
|
+
"besales_knowledge_qa_delete",
|
|
3575
|
+
"besales_knowledge_qa_search",
|
|
3576
|
+
"besales_knowledge_qa_move",
|
|
3577
|
+
"besales_knowledge_website_add",
|
|
3578
|
+
"besales_knowledge_website_list",
|
|
3579
|
+
"besales_knowledge_website_get",
|
|
3580
|
+
"besales_knowledge_website_delete"
|
|
3581
|
+
],
|
|
3582
|
+
"newly_added_in_v1_5_increment_4a": [
|
|
3583
|
+
"besales_variable_list",
|
|
3584
|
+
"besales_variable_create",
|
|
3585
|
+
"besales_variable_get",
|
|
3586
|
+
"besales_variable_update",
|
|
3587
|
+
"besales_variable_delete"
|
|
3588
|
+
],
|
|
3589
|
+
"newly_added_in_v1_5_increment_5a": [
|
|
3590
|
+
"besales_file_upload_request",
|
|
3591
|
+
"besales_file_upload_status",
|
|
3592
|
+
"besales_file_list"
|
|
3593
|
+
],
|
|
3594
|
+
"newly_added_in_v1_5_increment_5b": [
|
|
3595
|
+
"besales_platform_create_init",
|
|
3596
|
+
"besales_platform_create_status",
|
|
3597
|
+
"besales_platform_create_oauth_init"
|
|
3598
|
+
],
|
|
3599
|
+
"newly_added_in_v1_5_increment_5c": [
|
|
3600
|
+
"besales_crm_create_init",
|
|
3601
|
+
"besales_crm_create_status",
|
|
3602
|
+
"besales_crm_field_mapping_get",
|
|
3603
|
+
"besales_crm_field_mapping_upsert",
|
|
3604
|
+
"besales_crm_operator_list",
|
|
3605
|
+
"besales_crm_operator_update"
|
|
3606
|
+
],
|
|
3607
|
+
"newly_added_in_v1_5_increment_5d_crm_activate": [
|
|
3608
|
+
"besales_crm_activate"
|
|
3609
|
+
],
|
|
3610
|
+
"newly_added_in_v1_5_increment_4f": {
|
|
3611
|
+
"note": "data-source (1С) provisioning + management через MCP. Категория «БД»: 1С — товарная БД через OData; чтение/запись — действия триггеров, не tools агента.",
|
|
3612
|
+
"tools": ["besales_datasource_create_init", "besales_datasource_create_status", "besales_datasource_list", "besales_datasource_health", "besales_datasource_catalogs", "besales_datasource_catalog_roles", "besales_datasource_role_assign", "besales_datasource_enable", "besales_datasource_vectorize"]
|
|
3613
|
+
},
|
|
3614
|
+
"newly_added_crm_list": [
|
|
3615
|
+
"besales_crm_list"
|
|
3616
|
+
],
|
|
3617
|
+
"newly_added_in_v1_5_increment_4b": [
|
|
3618
|
+
"besales_crm_pipeline_list",
|
|
3619
|
+
"besales_crm_pipeline_get",
|
|
3620
|
+
"besales_crm_pipeline_create",
|
|
3621
|
+
"besales_crm_pipeline_update",
|
|
3622
|
+
"besales_crm_pipeline_delete",
|
|
3623
|
+
"besales_crm_pipeline_status_list",
|
|
3624
|
+
"besales_crm_pipeline_status_create",
|
|
3625
|
+
"besales_crm_pipeline_status_update",
|
|
3626
|
+
"besales_crm_pipeline_status_delete",
|
|
3627
|
+
"besales_platform_pipeline_link",
|
|
3628
|
+
"besales_platform_pipeline_unlink",
|
|
3629
|
+
"besales_platform_clone_preview",
|
|
3630
|
+
"besales_platform_clone_execute",
|
|
3631
|
+
"besales_platform_clone_status"
|
|
3632
|
+
],
|
|
1179
3633
|
"deferred_phase4_setup_tools": [
|
|
1180
3634
|
"besales_business_context_save",
|
|
1181
3635
|
"besales_channel_setup_save",
|