@besales/mcp 0.32.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -11
- package/dist/http/api-client.d.ts +2 -0
- package/dist/http/api-client.js +55 -0
- package/dist/http/api-client.js.map +1 -1
- package/dist/schemas/mcp-tools.json +1286 -50
- package/dist/tools/definitions/broadcast-analytics.d.ts +28 -7
- package/dist/tools/definitions/broadcast-analytics.js +399 -33
- package/dist/tools/definitions/broadcast-analytics.js.map +1 -1
- package/dist/tools/definitions/broadcast-mailing-variants.d.ts +19 -0
- package/dist/tools/definitions/broadcast-mailing-variants.js +107 -0
- package/dist/tools/definitions/broadcast-mailing-variants.js.map +1 -0
- package/dist/tools/definitions/getcourse-wave.d.ts +147 -0
- package/dist/tools/definitions/getcourse-wave.js +505 -0
- package/dist/tools/definitions/getcourse-wave.js.map +1 -0
- package/dist/tools/definitions/platform-setup.d.ts +114 -7
- package/dist/tools/definitions/platform-setup.js +106 -332
- package/dist/tools/definitions/platform-setup.js.map +1 -1
- package/dist/tools/definitions/scheduled-tasks.d.ts +4 -0
- package/dist/tools/definitions/scheduled-tasks.js +14 -2
- package/dist/tools/definitions/scheduled-tasks.js.map +1 -1
- package/dist/tools/definitions/session.js +6 -4
- package/dist/tools/definitions/session.js.map +1 -1
- package/dist/tools/definitions/shared.d.ts +53 -0
- package/dist/tools/definitions/shared.js +71 -0
- package/dist/tools/definitions/shared.js.map +1 -1
- package/dist/tools/definitions.d.ts +162 -14
- package/dist/tools/definitions.js +2 -0
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/registry-mapping-cases-core.d.ts +34 -0
- package/dist/tools/registry-mapping-cases-core.js +700 -0
- package/dist/tools/registry-mapping-cases-core.js.map +1 -0
- package/dist/tools/registry-mapping-cases-platform.d.ts +2 -0
- package/dist/tools/registry-mapping-cases-platform.js +910 -0
- package/dist/tools/registry-mapping-cases-platform.js.map +1 -0
- package/dist/tools/registry.js +12 -6
- package/dist/tools/registry.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,910 @@
|
|
|
1
|
+
export function createPlatformMappingCases(ids) {
|
|
2
|
+
const { workspaceId, agentId, icpId, crmConnectionId, runId, dialogueId, knowledgeSpaceId, platformId, toolId, routingRuleId, triggerId, sequenceId, auditLogId, qaId, targetSpaceId, websiteId, draftId, compareAgentId, } = ids;
|
|
3
|
+
return [
|
|
4
|
+
{
|
|
5
|
+
name: 'besales_agent_list',
|
|
6
|
+
input: { platform_id: platformId },
|
|
7
|
+
method: 'GET',
|
|
8
|
+
path: `/platforms/${platformId}/agents`,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: 'besales_agent_variable_overrides_get',
|
|
12
|
+
input: { platform_id: platformId, agent_id: agentId },
|
|
13
|
+
method: 'GET',
|
|
14
|
+
path: `/platforms/${platformId}/agents/${agentId}/variable-overrides`,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'besales_agent_create',
|
|
18
|
+
input: { platform_id: platformId, name: 'Sales', model_lane: 'STANDARD' },
|
|
19
|
+
path: `/platforms/${platformId}/agents`,
|
|
20
|
+
body: { name: 'Sales', modelLane: 'STANDARD' },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'besales_agent_update',
|
|
24
|
+
input: { platform_id: platformId, agent_id: agentId, use_global_history: false },
|
|
25
|
+
method: 'PATCH',
|
|
26
|
+
path: `/platforms/${platformId}/agents/${agentId}`,
|
|
27
|
+
body: { useGlobalHistory: false },
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'besales_agent_tools_update',
|
|
31
|
+
input: {
|
|
32
|
+
platform_id: platformId,
|
|
33
|
+
agent_id: agentId,
|
|
34
|
+
tools: [{ tool_id: toolId, priority: 3, is_enabled: true }],
|
|
35
|
+
},
|
|
36
|
+
method: 'PATCH',
|
|
37
|
+
path: `/platforms/${platformId}/agents/${agentId}/tools`,
|
|
38
|
+
body: { tools: [{ toolId, priority: 3, isEnabled: true }] },
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'besales_router_update',
|
|
42
|
+
input: {
|
|
43
|
+
platform_id: platformId,
|
|
44
|
+
skip_llm_routing: true,
|
|
45
|
+
direct_routing_agent_id: agentId,
|
|
46
|
+
explicit_confirmation: true,
|
|
47
|
+
},
|
|
48
|
+
method: 'PATCH',
|
|
49
|
+
path: `/platforms/${platformId}/router`,
|
|
50
|
+
body: {
|
|
51
|
+
skipLlmRouting: true,
|
|
52
|
+
directRoutingAgentId: agentId,
|
|
53
|
+
explicitConfirmation: true,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'besales_routing_rule_upsert',
|
|
58
|
+
input: {
|
|
59
|
+
platform_id: platformId,
|
|
60
|
+
routing_rule_id: routingRuleId,
|
|
61
|
+
routing_strategy: 'LEAD_STATUS',
|
|
62
|
+
custom_router_prompt: 'Prefer sales',
|
|
63
|
+
lead_statuses: [{ lead_status_name: 'hot' }],
|
|
64
|
+
},
|
|
65
|
+
method: 'PATCH',
|
|
66
|
+
path: `/platforms/${platformId}/router/routing-rules`,
|
|
67
|
+
body: {
|
|
68
|
+
routingRuleId,
|
|
69
|
+
routingStrategy: 'LEAD_STATUS',
|
|
70
|
+
customRouterPrompt: 'Prefer sales',
|
|
71
|
+
leadStatuses: [{ leadStatusName: 'hot' }],
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'besales_trigger_upsert',
|
|
76
|
+
input: {
|
|
77
|
+
platform_id: platformId,
|
|
78
|
+
agent_id: agentId,
|
|
79
|
+
trigger_id: triggerId,
|
|
80
|
+
is_enabled: false,
|
|
81
|
+
},
|
|
82
|
+
method: 'PATCH',
|
|
83
|
+
path: `/platforms/${platformId}/agents/${agentId}/triggers/${triggerId}`,
|
|
84
|
+
body: { isEnabled: false },
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'besales_trigger_upsert',
|
|
88
|
+
input: {
|
|
89
|
+
platform_id: platformId,
|
|
90
|
+
agent_id: agentId,
|
|
91
|
+
trigger_id: triggerId,
|
|
92
|
+
replace_actions: true,
|
|
93
|
+
actions: [{ actionType: 'SET_VARIABLE' }],
|
|
94
|
+
},
|
|
95
|
+
method: 'PATCH',
|
|
96
|
+
path: `/platforms/${platformId}/agents/${agentId}/triggers/${triggerId}`,
|
|
97
|
+
body: { actions: [{ actionType: 'SET_VARIABLE' }], replaceActions: true },
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'besales_trigger_delete',
|
|
101
|
+
input: {
|
|
102
|
+
platform_id: platformId,
|
|
103
|
+
agent_id: agentId,
|
|
104
|
+
trigger_id: triggerId,
|
|
105
|
+
explicit_confirmation: true,
|
|
106
|
+
},
|
|
107
|
+
method: 'DELETE',
|
|
108
|
+
path: `/platforms/${platformId}/agents/${agentId}/triggers/${triggerId}`,
|
|
109
|
+
body: { explicitConfirmation: true },
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'besales_behavior_update',
|
|
113
|
+
input: { platform_id: platformId, greeting: { bot_greeting: 'Hi' } },
|
|
114
|
+
method: 'PATCH',
|
|
115
|
+
path: `/platforms/${platformId}/agent-behavior`,
|
|
116
|
+
body: { greeting: { botGreeting: 'Hi' } },
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'besales_behavior_update',
|
|
120
|
+
input: { platform_id: platformId, privacy: { anonymization_enabled: true } },
|
|
121
|
+
method: 'PATCH',
|
|
122
|
+
path: `/platforms/${platformId}/agent-behavior`,
|
|
123
|
+
body: { privacy: { anonymizationEnabled: true } },
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'besales_behavior_update',
|
|
127
|
+
input: {
|
|
128
|
+
platform_id: platformId,
|
|
129
|
+
privacy: {
|
|
130
|
+
anonymization_disabled_types: ['PHONE'],
|
|
131
|
+
contact_name_personalization_mode: 'ENABLED',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
method: 'PATCH',
|
|
135
|
+
path: `/platforms/${platformId}/agent-behavior`,
|
|
136
|
+
body: {
|
|
137
|
+
privacy: {
|
|
138
|
+
anonymizationDisabledTypes: ['PHONE'],
|
|
139
|
+
contactNamePersonalizationMode: 'ENABLED',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'besales_followup_sequence_upsert',
|
|
145
|
+
input: {
|
|
146
|
+
platform_id: platformId,
|
|
147
|
+
sequence_id: sequenceId,
|
|
148
|
+
name: 'reactivation',
|
|
149
|
+
type: 'LOST_CLIENTS',
|
|
150
|
+
trigger: 'LOST_CLIENTS',
|
|
151
|
+
config: { days: 30 },
|
|
152
|
+
},
|
|
153
|
+
method: 'PATCH',
|
|
154
|
+
path: `/platforms/${platformId}/follow-up/sequences/${sequenceId}`,
|
|
155
|
+
body: {
|
|
156
|
+
name: 'reactivation',
|
|
157
|
+
type: 'LOST_CLIENTS',
|
|
158
|
+
trigger: 'LOST_CLIENTS',
|
|
159
|
+
config: { days: 30 },
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: 'besales_pipeline_settings_update',
|
|
164
|
+
input: {
|
|
165
|
+
platform_id: platformId,
|
|
166
|
+
crm_pipeline_behavior: { filter_enabled: true },
|
|
167
|
+
},
|
|
168
|
+
method: 'PATCH',
|
|
169
|
+
path: `/platforms/${platformId}/pipeline-settings`,
|
|
170
|
+
body: { crmPipelineBehavior: { filterEnabled: true } },
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: 'besales_platform_settings_update',
|
|
174
|
+
input: {
|
|
175
|
+
platform_id: platformId,
|
|
176
|
+
access_control: { is_ai_enabled: true },
|
|
177
|
+
},
|
|
178
|
+
method: 'PATCH',
|
|
179
|
+
path: `/platforms/${platformId}/settings`,
|
|
180
|
+
body: { accessControl: { isAiEnabled: true } },
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: 'besales_platform_settings_update',
|
|
184
|
+
input: {
|
|
185
|
+
platform_id: platformId,
|
|
186
|
+
getcourse_settings: {
|
|
187
|
+
wave_field_bindings: {
|
|
188
|
+
product_value_source: 'NAME',
|
|
189
|
+
product: { field_id: 101, field_label: 'Продукт' },
|
|
190
|
+
channels: { field_id: 102, field_label: 'Каналы' },
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
method: 'PATCH',
|
|
195
|
+
path: `/platforms/${platformId}/settings`,
|
|
196
|
+
body: {
|
|
197
|
+
getcourseSettings: {
|
|
198
|
+
waveFieldBindings: {
|
|
199
|
+
productValueSource: 'NAME',
|
|
200
|
+
product: { fieldId: 101, fieldLabel: 'Продукт' },
|
|
201
|
+
channels: { fieldId: 102, fieldLabel: 'Каналы' },
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: 'besales_audit_revert',
|
|
208
|
+
input: { platform_id: platformId, audit_log_id: auditLogId },
|
|
209
|
+
method: 'POST',
|
|
210
|
+
path: `/platforms/${platformId}/audit/${auditLogId}/revert`,
|
|
211
|
+
},
|
|
212
|
+
// Phase 4 — audio import mode
|
|
213
|
+
{
|
|
214
|
+
name: 'besales_icp_import_dialogues',
|
|
215
|
+
input: {
|
|
216
|
+
icp_id: icpId,
|
|
217
|
+
mode: 'audio',
|
|
218
|
+
audio_source_type: 'amocrm_leads',
|
|
219
|
+
audio_source_config: {
|
|
220
|
+
crmConnectionId,
|
|
221
|
+
leadIds: ['24001691', '24000957'],
|
|
222
|
+
defaultOutcome: 'won',
|
|
223
|
+
},
|
|
224
|
+
language: 'uz-UZ',
|
|
225
|
+
},
|
|
226
|
+
method: 'POST',
|
|
227
|
+
path: `/icp/audio-import-runs`,
|
|
228
|
+
body: {
|
|
229
|
+
icpProfileId: icpId,
|
|
230
|
+
sourceType: 'amocrm_leads',
|
|
231
|
+
sourceConfig: {
|
|
232
|
+
crmConnectionId,
|
|
233
|
+
leadIds: ['24001691', '24000957'],
|
|
234
|
+
defaultOutcome: 'won',
|
|
235
|
+
},
|
|
236
|
+
language: 'uz-UZ',
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: 'besales_icp_import_status',
|
|
241
|
+
input: { run_id: icpId },
|
|
242
|
+
method: 'GET',
|
|
243
|
+
path: `/icp/audio-import-runs/${icpId}`,
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: 'besales_workbook_inspect',
|
|
247
|
+
input: { stored_file_id: agentId, sample_rows_per_sheet: 5, max_cells_total: 100 },
|
|
248
|
+
path: `/workspaces/${workspaceId}/workbooks/inspect`,
|
|
249
|
+
body: {
|
|
250
|
+
storedFileId: agentId,
|
|
251
|
+
sampleRowsPerSheet: 5,
|
|
252
|
+
maxCellsTotal: 100,
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
name: 'besales_workbook_extract_amocrm_leads',
|
|
257
|
+
input: { workbook_id: agentId, sheet_title: 'Все разговоры', include_contacts: true },
|
|
258
|
+
path: `/workspaces/${workspaceId}/workbooks/${agentId}/extract-amocrm-leads`,
|
|
259
|
+
body: {
|
|
260
|
+
sheetTitle: 'Все разговоры',
|
|
261
|
+
includeContacts: true,
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
name: 'besales_workbook_to_knowledge_document',
|
|
266
|
+
input: {
|
|
267
|
+
workbook_id: agentId,
|
|
268
|
+
sheet_gid: 12345,
|
|
269
|
+
namespace: 'aslzar-rules',
|
|
270
|
+
split_override: {
|
|
271
|
+
split_mode: 'separator',
|
|
272
|
+
separator: '\n## ',
|
|
273
|
+
max_chunk_size: 1500,
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
path: `/workspaces/${workspaceId}/workbooks/${agentId}/knowledge-document`,
|
|
277
|
+
body: {
|
|
278
|
+
sheetGid: 12345,
|
|
279
|
+
namespace: 'aslzar-rules',
|
|
280
|
+
splitOverride: {
|
|
281
|
+
splitMode: 'separator',
|
|
282
|
+
separator: '\n## ',
|
|
283
|
+
maxChunkSize: 1500,
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
// v1.5 Increment 1 — Knowledge Spaces (6 tools)
|
|
288
|
+
{
|
|
289
|
+
name: 'besales_knowledge_space_create',
|
|
290
|
+
input: { name: 'support-faq', scope_type: 'WORKSPACE', access_mode: 'AUTO_QUERY' },
|
|
291
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces`,
|
|
292
|
+
body: { name: 'support-faq', scope_type: 'WORKSPACE', access_mode: 'AUTO_QUERY' },
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: 'besales_knowledge_space_list',
|
|
296
|
+
input: { scope_type: 'WORKSPACE' },
|
|
297
|
+
method: 'GET',
|
|
298
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces?scope_type=WORKSPACE`,
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: 'besales_knowledge_space_get',
|
|
302
|
+
input: { knowledge_space_id: knowledgeSpaceId },
|
|
303
|
+
method: 'GET',
|
|
304
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}`,
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: 'besales_knowledge_space_patch',
|
|
308
|
+
input: { knowledge_space_id: knowledgeSpaceId, access_mode: 'TOOL_ONLY' },
|
|
309
|
+
method: 'PATCH',
|
|
310
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}`,
|
|
311
|
+
body: { access_mode: 'TOOL_ONLY' },
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
name: 'besales_knowledge_space_channel_link_upsert',
|
|
315
|
+
input: { knowledge_space_id: knowledgeSpaceId, channel_id: platformId },
|
|
316
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/channel-links`,
|
|
317
|
+
body: { channel_id: platformId },
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
name: 'besales_knowledge_space_channel_link_remove',
|
|
321
|
+
input: { knowledge_space_id: knowledgeSpaceId, channel_id: platformId },
|
|
322
|
+
method: 'DELETE',
|
|
323
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/channel-links/${platformId}`,
|
|
324
|
+
},
|
|
325
|
+
// v1.5 Increment 1 — Knowledge Documents (4 tools)
|
|
326
|
+
{
|
|
327
|
+
name: 'besales_knowledge_document_upload',
|
|
328
|
+
input: {
|
|
329
|
+
knowledge_space_id: knowledgeSpaceId,
|
|
330
|
+
source_kind: 'TEXT',
|
|
331
|
+
content: '# Hello world',
|
|
332
|
+
filename: 'hello.md',
|
|
333
|
+
},
|
|
334
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/documents`,
|
|
335
|
+
body: {
|
|
336
|
+
source_kind: 'TEXT',
|
|
337
|
+
content: '# Hello world',
|
|
338
|
+
filename: 'hello.md',
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
name: 'besales_knowledge_document_list',
|
|
343
|
+
input: { knowledge_space_id: knowledgeSpaceId, status: 'COMPLETED', page: 1, limit: 20 },
|
|
344
|
+
method: 'GET',
|
|
345
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/documents?status=COMPLETED&page=1&limit=20`,
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
name: 'besales_knowledge_document_get',
|
|
349
|
+
input: { knowledge_space_id: knowledgeSpaceId, document_id: triggerId },
|
|
350
|
+
method: 'GET',
|
|
351
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/documents/${triggerId}`,
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
name: 'besales_knowledge_document_delete',
|
|
355
|
+
input: { knowledge_space_id: knowledgeSpaceId, document_id: triggerId, explicit_confirmation: true },
|
|
356
|
+
method: 'DELETE',
|
|
357
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/documents/${triggerId}`,
|
|
358
|
+
body: { explicit_confirmation: true },
|
|
359
|
+
},
|
|
360
|
+
// v1.5 Increment 2 — Knowledge Q&A (7 tools)
|
|
361
|
+
{
|
|
362
|
+
name: 'besales_knowledge_qa_create',
|
|
363
|
+
input: {
|
|
364
|
+
knowledge_space_id: knowledgeSpaceId,
|
|
365
|
+
question: 'How do I cancel?',
|
|
366
|
+
answer: 'In settings.',
|
|
367
|
+
},
|
|
368
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/qa-pairs`,
|
|
369
|
+
body: { question: 'How do I cancel?', answer: 'In settings.' },
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
name: 'besales_knowledge_qa_list',
|
|
373
|
+
input: { knowledge_space_id: knowledgeSpaceId, mode: 'SIMPLE', page: 1, limit: 20 },
|
|
374
|
+
method: 'GET',
|
|
375
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/qa-pairs?mode=SIMPLE&page=1&limit=20`,
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
name: 'besales_knowledge_qa_get',
|
|
379
|
+
input: { knowledge_space_id: knowledgeSpaceId, qa_id: qaId },
|
|
380
|
+
method: 'GET',
|
|
381
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/qa-pairs/${qaId}`,
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
name: 'besales_knowledge_qa_patch',
|
|
385
|
+
input: { knowledge_space_id: knowledgeSpaceId, qa_id: qaId, question: 'updated?' },
|
|
386
|
+
method: 'PATCH',
|
|
387
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/qa-pairs/${qaId}`,
|
|
388
|
+
body: { question: 'updated?' },
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
name: 'besales_knowledge_qa_delete',
|
|
392
|
+
input: { knowledge_space_id: knowledgeSpaceId, qa_id: qaId, explicit_confirmation: true },
|
|
393
|
+
method: 'DELETE',
|
|
394
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/qa-pairs/${qaId}`,
|
|
395
|
+
body: { explicit_confirmation: true },
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
name: 'besales_knowledge_qa_search',
|
|
399
|
+
input: { knowledge_space_id: knowledgeSpaceId, query: 'cancel', top_k: 10 },
|
|
400
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/qa-pairs/search`,
|
|
401
|
+
body: { query: 'cancel', top_k: 10 },
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
name: 'besales_knowledge_qa_move',
|
|
405
|
+
input: {
|
|
406
|
+
source_space_id: knowledgeSpaceId,
|
|
407
|
+
qa_id: qaId,
|
|
408
|
+
target_space_id: targetSpaceId,
|
|
409
|
+
explicit_confirmation: true,
|
|
410
|
+
},
|
|
411
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/qa-pairs/${qaId}/move`,
|
|
412
|
+
body: { target_space_id: targetSpaceId, explicit_confirmation: true },
|
|
413
|
+
},
|
|
414
|
+
// v1.5 Increment 2 — Knowledge Websites (4 tools)
|
|
415
|
+
{
|
|
416
|
+
name: 'besales_knowledge_website_add',
|
|
417
|
+
input: {
|
|
418
|
+
knowledge_space_id: knowledgeSpaceId,
|
|
419
|
+
url: 'https://example.com',
|
|
420
|
+
display_name: 'Example',
|
|
421
|
+
},
|
|
422
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/websites`,
|
|
423
|
+
body: { url: 'https://example.com', display_name: 'Example' },
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
name: 'besales_knowledge_website_list',
|
|
427
|
+
input: { knowledge_space_id: knowledgeSpaceId, status: 'COMPLETED', page: 1, limit: 20 },
|
|
428
|
+
method: 'GET',
|
|
429
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/websites?status=COMPLETED&page=1&limit=20`,
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
name: 'besales_knowledge_website_get',
|
|
433
|
+
input: { knowledge_space_id: knowledgeSpaceId, website_id: websiteId },
|
|
434
|
+
method: 'GET',
|
|
435
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/websites/${websiteId}`,
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
name: 'besales_knowledge_website_delete',
|
|
439
|
+
input: { knowledge_space_id: knowledgeSpaceId, website_id: websiteId, explicit_confirmation: true },
|
|
440
|
+
method: 'DELETE',
|
|
441
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/websites/${websiteId}`,
|
|
442
|
+
body: { explicit_confirmation: true },
|
|
443
|
+
},
|
|
444
|
+
// v1.5 Increment 3 — Knowledge Tables (6 tools). Phase B (2026-05-27) удалил legacy_self_analysis_set.
|
|
445
|
+
{
|
|
446
|
+
name: 'besales_knowledge_table_link',
|
|
447
|
+
input: {
|
|
448
|
+
knowledge_space_id: knowledgeSpaceId,
|
|
449
|
+
source: { kind: 'GOOGLE_SHEETS', spreadsheet_url: 'https://docs.google.com/x' },
|
|
450
|
+
display_name: 'Prices',
|
|
451
|
+
use_vector_index: true,
|
|
452
|
+
},
|
|
453
|
+
method: 'POST',
|
|
454
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/tables`,
|
|
455
|
+
body: {
|
|
456
|
+
source: { kind: 'GOOGLE_SHEETS', spreadsheet_url: 'https://docs.google.com/x' },
|
|
457
|
+
display_name: 'Prices',
|
|
458
|
+
use_vector_index: true,
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
name: 'besales_knowledge_table_list',
|
|
463
|
+
input: { knowledge_space_id: knowledgeSpaceId, is_active: true, page: 1, limit: 20 },
|
|
464
|
+
method: 'GET',
|
|
465
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/tables?is_active=true&page=1&limit=20`,
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
name: 'besales_knowledge_table_get',
|
|
469
|
+
input: { knowledge_space_id: knowledgeSpaceId, table_id: triggerId },
|
|
470
|
+
method: 'GET',
|
|
471
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/tables/${triggerId}`,
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
name: 'besales_knowledge_table_patch',
|
|
475
|
+
input: {
|
|
476
|
+
knowledge_space_id: knowledgeSpaceId,
|
|
477
|
+
table_id: triggerId,
|
|
478
|
+
display_name: 'Prices v2',
|
|
479
|
+
use_vector_index: true,
|
|
480
|
+
},
|
|
481
|
+
method: 'PATCH',
|
|
482
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/tables/${triggerId}`,
|
|
483
|
+
body: { display_name: 'Prices v2', use_vector_index: true },
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
name: 'besales_knowledge_table_delete',
|
|
487
|
+
input: {
|
|
488
|
+
knowledge_space_id: knowledgeSpaceId,
|
|
489
|
+
table_id: triggerId,
|
|
490
|
+
explicit_confirmation: true,
|
|
491
|
+
},
|
|
492
|
+
method: 'DELETE',
|
|
493
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/tables/${triggerId}`,
|
|
494
|
+
body: { explicit_confirmation: true },
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
name: 'besales_knowledge_table_reindex',
|
|
498
|
+
input: {
|
|
499
|
+
knowledge_space_id: knowledgeSpaceId,
|
|
500
|
+
table_id: triggerId,
|
|
501
|
+
explicit_confirmation: true,
|
|
502
|
+
},
|
|
503
|
+
method: 'POST',
|
|
504
|
+
path: `/workspaces/${workspaceId}/knowledge-spaces/${knowledgeSpaceId}/tables/${triggerId}/reindex`,
|
|
505
|
+
body: { explicit_confirmation: true },
|
|
506
|
+
},
|
|
507
|
+
// v1.5 Increment 4a — Unified Variables API (5 tools, scope discriminator).
|
|
508
|
+
{
|
|
509
|
+
name: 'besales_variable_list',
|
|
510
|
+
input: { scope: 'WORKSPACE' },
|
|
511
|
+
method: 'GET',
|
|
512
|
+
path: `/workspaces/${workspaceId}/variables?scope=WORKSPACE`,
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
name: 'besales_variable_create',
|
|
516
|
+
input: {
|
|
517
|
+
scope: 'CHANNEL',
|
|
518
|
+
platform_id: platformId,
|
|
519
|
+
name: 'city',
|
|
520
|
+
type: 'TEXT',
|
|
521
|
+
is_constant: true,
|
|
522
|
+
constant_value: 'Moscow',
|
|
523
|
+
},
|
|
524
|
+
method: 'POST',
|
|
525
|
+
path: `/workspaces/${workspaceId}/variables`,
|
|
526
|
+
body: {
|
|
527
|
+
scope: 'CHANNEL',
|
|
528
|
+
name: 'city',
|
|
529
|
+
type: 'TEXT',
|
|
530
|
+
platformId,
|
|
531
|
+
isConstant: true,
|
|
532
|
+
constantValue: 'Moscow',
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
name: 'besales_variable_get',
|
|
537
|
+
input: { variable_id: triggerId, scope: 'WORKSPACE' },
|
|
538
|
+
method: 'GET',
|
|
539
|
+
path: `/workspaces/${workspaceId}/variables/${triggerId}?scope=WORKSPACE`,
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
name: 'besales_variable_update',
|
|
543
|
+
input: {
|
|
544
|
+
variable_id: triggerId,
|
|
545
|
+
scope: 'WORKSPACE',
|
|
546
|
+
value: 'NewValue',
|
|
547
|
+
description: 'Updated',
|
|
548
|
+
},
|
|
549
|
+
method: 'PATCH',
|
|
550
|
+
path: `/workspaces/${workspaceId}/variables/${triggerId}`,
|
|
551
|
+
body: { scope: 'WORKSPACE', description: 'Updated', value: 'NewValue' },
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
name: 'besales_variable_delete',
|
|
555
|
+
input: { variable_id: triggerId, scope: 'WORKSPACE', explicit_confirmation: true },
|
|
556
|
+
method: 'DELETE',
|
|
557
|
+
path: `/workspaces/${workspaceId}/variables/${triggerId}`,
|
|
558
|
+
body: { scope: 'WORKSPACE', explicitConfirmation: true },
|
|
559
|
+
},
|
|
560
|
+
// v1.5 Increment 4b — CRM Pipelines (11 tools)
|
|
561
|
+
{
|
|
562
|
+
name: 'besales_crm_pipeline_list',
|
|
563
|
+
input: { workspace_id: workspaceId, crm_id: knowledgeSpaceId },
|
|
564
|
+
method: 'GET',
|
|
565
|
+
path: `/workspaces/${workspaceId}/crm/${knowledgeSpaceId}/pipelines`,
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
name: 'besales_crm_pipeline_get',
|
|
569
|
+
input: { workspace_id: workspaceId, crm_id: knowledgeSpaceId, pipeline_id: 100 },
|
|
570
|
+
method: 'GET',
|
|
571
|
+
path: `/workspaces/${workspaceId}/crm/${knowledgeSpaceId}/pipelines/100`,
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
name: 'besales_crm_pipeline_create',
|
|
575
|
+
input: {
|
|
576
|
+
workspace_id: workspaceId,
|
|
577
|
+
crm_id: knowledgeSpaceId,
|
|
578
|
+
name: 'Sales',
|
|
579
|
+
acknowledge_external_side_effect: true,
|
|
580
|
+
},
|
|
581
|
+
method: 'POST',
|
|
582
|
+
path: `/workspaces/${workspaceId}/crm/${knowledgeSpaceId}/pipelines`,
|
|
583
|
+
body: { name: 'Sales', acknowledgeExternalSideEffect: true },
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
name: 'besales_crm_pipeline_update',
|
|
587
|
+
input: {
|
|
588
|
+
workspace_id: workspaceId,
|
|
589
|
+
crm_id: knowledgeSpaceId,
|
|
590
|
+
pipeline_id: 100,
|
|
591
|
+
name: 'Renamed',
|
|
592
|
+
acknowledge_external_side_effect: true,
|
|
593
|
+
},
|
|
594
|
+
method: 'PATCH',
|
|
595
|
+
path: `/workspaces/${workspaceId}/crm/${knowledgeSpaceId}/pipelines/100`,
|
|
596
|
+
body: { name: 'Renamed', acknowledgeExternalSideEffect: true },
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
name: 'besales_crm_pipeline_delete',
|
|
600
|
+
input: {
|
|
601
|
+
workspace_id: workspaceId,
|
|
602
|
+
crm_id: knowledgeSpaceId,
|
|
603
|
+
pipeline_id: 100,
|
|
604
|
+
explicit_confirmation: true,
|
|
605
|
+
acknowledge_external_side_effect: true,
|
|
606
|
+
},
|
|
607
|
+
method: 'DELETE',
|
|
608
|
+
path: `/workspaces/${workspaceId}/crm/${knowledgeSpaceId}/pipelines/100`,
|
|
609
|
+
body: { explicitConfirmation: true, acknowledgeExternalSideEffect: true },
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
name: 'besales_crm_pipeline_status_list',
|
|
613
|
+
input: { workspace_id: workspaceId, crm_id: knowledgeSpaceId, pipeline_id: 100 },
|
|
614
|
+
method: 'GET',
|
|
615
|
+
path: `/workspaces/${workspaceId}/crm/${knowledgeSpaceId}/pipelines/100/statuses`,
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
name: 'besales_crm_pipeline_status_create',
|
|
619
|
+
input: {
|
|
620
|
+
workspace_id: workspaceId,
|
|
621
|
+
crm_id: knowledgeSpaceId,
|
|
622
|
+
pipeline_id: 100,
|
|
623
|
+
name: 'In progress',
|
|
624
|
+
sort: 10,
|
|
625
|
+
acknowledge_external_side_effect: true,
|
|
626
|
+
},
|
|
627
|
+
method: 'POST',
|
|
628
|
+
path: `/workspaces/${workspaceId}/crm/${knowledgeSpaceId}/pipelines/100/statuses`,
|
|
629
|
+
body: {
|
|
630
|
+
name: 'In progress',
|
|
631
|
+
sort: 10,
|
|
632
|
+
acknowledgeExternalSideEffect: true,
|
|
633
|
+
},
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
name: 'besales_crm_pipeline_status_update',
|
|
637
|
+
input: {
|
|
638
|
+
workspace_id: workspaceId,
|
|
639
|
+
crm_id: knowledgeSpaceId,
|
|
640
|
+
pipeline_id: 100,
|
|
641
|
+
status_id: 200,
|
|
642
|
+
is_system_managed: false,
|
|
643
|
+
is_bot_active: true,
|
|
644
|
+
acknowledge_external_side_effect: true,
|
|
645
|
+
},
|
|
646
|
+
method: 'PATCH',
|
|
647
|
+
path: `/workspaces/${workspaceId}/crm/${knowledgeSpaceId}/pipelines/100/statuses/200`,
|
|
648
|
+
body: {
|
|
649
|
+
isSystemManaged: false,
|
|
650
|
+
isBotActive: true,
|
|
651
|
+
acknowledgeExternalSideEffect: true,
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
name: 'besales_crm_pipeline_status_delete',
|
|
656
|
+
input: {
|
|
657
|
+
workspace_id: workspaceId,
|
|
658
|
+
crm_id: knowledgeSpaceId,
|
|
659
|
+
pipeline_id: 100,
|
|
660
|
+
status_id: 200,
|
|
661
|
+
explicit_confirmation: true,
|
|
662
|
+
acknowledge_external_side_effect: true,
|
|
663
|
+
},
|
|
664
|
+
method: 'DELETE',
|
|
665
|
+
path: `/workspaces/${workspaceId}/crm/${knowledgeSpaceId}/pipelines/100/statuses/200`,
|
|
666
|
+
body: { explicitConfirmation: true, acknowledgeExternalSideEffect: true },
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
name: 'besales_platform_pipeline_link',
|
|
670
|
+
input: {
|
|
671
|
+
workspace_id: workspaceId,
|
|
672
|
+
platform_id: platformId,
|
|
673
|
+
pipeline_id: 100,
|
|
674
|
+
pipeline_crm_id: knowledgeSpaceId,
|
|
675
|
+
sort: 1,
|
|
676
|
+
},
|
|
677
|
+
method: 'POST',
|
|
678
|
+
path: `/workspaces/${workspaceId}/platforms/${platformId}/active-pipelines`,
|
|
679
|
+
body: { pipelineId: 100, pipelineCrmId: knowledgeSpaceId, sort: 1 },
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
name: 'besales_platform_pipeline_unlink',
|
|
683
|
+
input: {
|
|
684
|
+
workspace_id: workspaceId,
|
|
685
|
+
platform_id: platformId,
|
|
686
|
+
platform_pipeline_id: triggerId,
|
|
687
|
+
explicit_confirmation: true,
|
|
688
|
+
},
|
|
689
|
+
method: 'DELETE',
|
|
690
|
+
path: `/workspaces/${workspaceId}/platforms/${platformId}/active-pipelines/${triggerId}`,
|
|
691
|
+
body: { explicitConfirmation: true },
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
name: 'besales_file_upload_request',
|
|
695
|
+
input: { name: 'Прайс', file_type: 'DOCUMENT', source: 'USER_UPLOAD' },
|
|
696
|
+
method: 'POST',
|
|
697
|
+
path: `/workspaces/${workspaceId}/file-upload-sessions`,
|
|
698
|
+
body: { name: 'Прайс', file_type: 'DOCUMENT', source: 'USER_UPLOAD' },
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
name: 'besales_file_upload_status',
|
|
702
|
+
input: { upload_ref: 'REF123' },
|
|
703
|
+
method: 'GET',
|
|
704
|
+
path: `/workspaces/${workspaceId}/file-upload-sessions/REF123`,
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
name: 'besales_file_list',
|
|
708
|
+
input: { file_type: 'DOCUMENT', limit: 10 },
|
|
709
|
+
method: 'GET',
|
|
710
|
+
path: `/workspaces/${workspaceId}/files?file_type=DOCUMENT&limit=10`,
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
name: 'besales_platform_create_init',
|
|
714
|
+
input: { platform_type: 'Wazzup', name: 'My WA', fields: { wazzup_channel: 'WhatsApp' } },
|
|
715
|
+
method: 'POST',
|
|
716
|
+
path: `/workspaces/${workspaceId}/platform-setup-sessions`,
|
|
717
|
+
body: { platform_type: 'Wazzup', name: 'My WA', fields: { wazzup_channel: 'WhatsApp' } },
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
name: 'besales_platform_create_status',
|
|
721
|
+
input: { setup_ref: 'REF123' },
|
|
722
|
+
method: 'GET',
|
|
723
|
+
path: `/workspaces/${workspaceId}/platform-setup-sessions/REF123`,
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
name: 'besales_platform_create_oauth_init',
|
|
727
|
+
input: { platform_type: 'Instagram' },
|
|
728
|
+
method: 'POST',
|
|
729
|
+
path: `/workspaces/${workspaceId}/platform-oauth-sessions`,
|
|
730
|
+
body: { platform_type: 'Instagram' },
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
name: 'besales_crm_create_init',
|
|
734
|
+
input: { crm_type: 'GETCOURSE', fields: { account_domain: 'school.getcourse.ru' } },
|
|
735
|
+
method: 'POST',
|
|
736
|
+
path: `/workspaces/${workspaceId}/crm-setup-sessions`,
|
|
737
|
+
body: { crm_type: 'GETCOURSE', fields: { account_domain: 'school.getcourse.ru' } },
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
name: 'besales_crm_create_status',
|
|
741
|
+
input: { setup_ref: 'CRMREF' },
|
|
742
|
+
method: 'GET',
|
|
743
|
+
path: `/workspaces/${workspaceId}/crm-setup-sessions/CRMREF`,
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
name: 'besales_crm_field_mapping_get',
|
|
747
|
+
input: { crm_id: knowledgeSpaceId },
|
|
748
|
+
method: 'GET',
|
|
749
|
+
path: `/workspaces/${workspaceId}/crms/${knowledgeSpaceId}/field-mapping`,
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
name: 'besales_crm_field_mapping_upsert',
|
|
753
|
+
input: {
|
|
754
|
+
crm_id: knowledgeSpaceId,
|
|
755
|
+
replace_all_existing: true,
|
|
756
|
+
enabled: true,
|
|
757
|
+
field_mappings: [{ crm_field_id: '12345', save_as: 'phone', enabled: true, special_purpose: 'phone' }],
|
|
758
|
+
},
|
|
759
|
+
method: 'PUT',
|
|
760
|
+
path: `/workspaces/${workspaceId}/crms/${knowledgeSpaceId}/field-mapping`,
|
|
761
|
+
body: {
|
|
762
|
+
replace_all_existing: true,
|
|
763
|
+
enabled: true,
|
|
764
|
+
field_mappings: [{ crm_field_id: '12345', save_as: 'phone', enabled: true, special_purpose: 'phone' }],
|
|
765
|
+
},
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
name: 'besales_crm_operator_list',
|
|
769
|
+
input: { crm_id: knowledgeSpaceId, sync: true },
|
|
770
|
+
method: 'GET',
|
|
771
|
+
path: `/workspaces/${workspaceId}/crms/${knowledgeSpaceId}/operators?sync=true`,
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
name: 'besales_crm_operator_update',
|
|
775
|
+
input: { crm_id: knowledgeSpaceId, operator_id: triggerId, is_operator: true, is_sdr: false },
|
|
776
|
+
method: 'PATCH',
|
|
777
|
+
path: `/workspaces/${workspaceId}/crms/${knowledgeSpaceId}/operators/${triggerId}`,
|
|
778
|
+
body: { is_operator: true, is_sdr: false },
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
name: 'besales_model_catalog_list',
|
|
782
|
+
input: {},
|
|
783
|
+
method: 'GET',
|
|
784
|
+
path: '/model-catalog',
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
name: 'besales_model_comparison_run_start',
|
|
788
|
+
input: {
|
|
789
|
+
agent_id: agentId,
|
|
790
|
+
models: ['gpt-5.4-mini'],
|
|
791
|
+
dialogue_count: 5,
|
|
792
|
+
message_direction: 'INBOUND',
|
|
793
|
+
},
|
|
794
|
+
path: `/agents/${agentId}/model-comparison/runs`,
|
|
795
|
+
body: { models: ['gpt-5.4-mini'], dialogueCount: 5, messageDirection: 'INBOUND' },
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
name: 'besales_model_comparison_get',
|
|
799
|
+
input: { run_id: runId },
|
|
800
|
+
method: 'GET',
|
|
801
|
+
path: `/model-comparison/runs/${runId}`,
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
name: 'besales_model_comparison_eval_submit',
|
|
805
|
+
input: {
|
|
806
|
+
run_id: runId,
|
|
807
|
+
winner: 'gpt-5.4-mini',
|
|
808
|
+
rationale: 'best tone',
|
|
809
|
+
per_model: [
|
|
810
|
+
{
|
|
811
|
+
model: 'gpt-5.4-mini',
|
|
812
|
+
success_score: 80,
|
|
813
|
+
strengths: [],
|
|
814
|
+
weaknesses: [],
|
|
815
|
+
excerpts: [],
|
|
816
|
+
},
|
|
817
|
+
],
|
|
818
|
+
},
|
|
819
|
+
path: `/model-comparison/runs/${runId}/eval`,
|
|
820
|
+
body: {
|
|
821
|
+
winner: 'gpt-5.4-mini',
|
|
822
|
+
rationale: 'best tone',
|
|
823
|
+
perModel: [
|
|
824
|
+
{
|
|
825
|
+
model: 'gpt-5.4-mini',
|
|
826
|
+
successScore: 80,
|
|
827
|
+
strengths: [],
|
|
828
|
+
weaknesses: [],
|
|
829
|
+
excerpts: [],
|
|
830
|
+
},
|
|
831
|
+
],
|
|
832
|
+
},
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
name: 'besales_dialogues_query',
|
|
836
|
+
input: {
|
|
837
|
+
workspace_id: workspaceId,
|
|
838
|
+
work_log_event: ['FINISH_WIN'],
|
|
839
|
+
action_type: ['GETCOURSE_CREATE_DEAL', 'GETCOURSE_SEND_PAYMENT_LINK'],
|
|
840
|
+
action_success: true,
|
|
841
|
+
action_execution_mode: 'production',
|
|
842
|
+
ai_enabled: true,
|
|
843
|
+
limit: 50,
|
|
844
|
+
},
|
|
845
|
+
method: 'GET',
|
|
846
|
+
path: `/workspaces/${workspaceId}/dialogue-export?workLogEvent=FINISH_WIN&actionType=GETCOURSE_CREATE_DEAL%2CGETCOURSE_SEND_PAYMENT_LINK&actionSuccess=true&actionExecutionMode=production&aiEnabled=true&limit=50`,
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
name: 'besales_dialogue_transcript',
|
|
850
|
+
input: { conversation_id: dialogueId, limit: 50 },
|
|
851
|
+
method: 'GET',
|
|
852
|
+
path: `/dialogue-export/${dialogueId}/transcript?limit=50`,
|
|
853
|
+
},
|
|
854
|
+
// `query` в ApiToolRequest нет, поэтому draft_id клеится в path через buildListQuery —
|
|
855
|
+
// единственное место, где путь тулзы собирается не литералом, и его надо закрепить.
|
|
856
|
+
{
|
|
857
|
+
name: 'besales_prompt_headroom',
|
|
858
|
+
input: { agent_id: agentId },
|
|
859
|
+
method: 'GET',
|
|
860
|
+
path: `/agents/${agentId}/prompt/headroom`,
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
name: 'besales_prompt_headroom',
|
|
864
|
+
input: { agent_id: agentId, draft_id: draftId },
|
|
865
|
+
method: 'GET',
|
|
866
|
+
path: `/agents/${agentId}/prompt/headroom?draftId=${draftId}`,
|
|
867
|
+
},
|
|
868
|
+
// Закрепляем snake→camel маппинг тела: был инцидент, когда batch-тулза слала имя поля,
|
|
869
|
+
// которого нет в DTO, и получала 400 всегда.
|
|
870
|
+
{
|
|
871
|
+
name: 'besales_prompt_diff',
|
|
872
|
+
input: { agent_id: agentId, compare_agent_id: compareAgentId, max_lines: 50 },
|
|
873
|
+
method: 'POST',
|
|
874
|
+
path: `/agents/${agentId}/prompt/diff`,
|
|
875
|
+
body: { compareAgentId, maxLines: 50 },
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
name: 'besales_prompt_batch_start',
|
|
879
|
+
input: {
|
|
880
|
+
agent_ids: [agentId, compareAgentId],
|
|
881
|
+
operations: [{ type: 'replace_text', target_text: 'было', replacement_text: 'стало' }],
|
|
882
|
+
all_or_nothing: true,
|
|
883
|
+
idempotency_key: 'batch-1',
|
|
884
|
+
platform_id: platformId,
|
|
885
|
+
},
|
|
886
|
+
method: 'POST',
|
|
887
|
+
path: '/prompt-batch/runs',
|
|
888
|
+
body: {
|
|
889
|
+
agentIds: [agentId, compareAgentId],
|
|
890
|
+
operations: [{ type: 'replace_text', targetText: 'было', replacementText: 'стало' }],
|
|
891
|
+
allOrNothing: true,
|
|
892
|
+
idempotencyKey: 'batch-1',
|
|
893
|
+
platformId,
|
|
894
|
+
},
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
name: 'besales_prompt_batch_status',
|
|
898
|
+
input: { run_id: runId },
|
|
899
|
+
method: 'GET',
|
|
900
|
+
path: `/prompt-batch/runs/${runId}`,
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
name: 'besales_prompt_batch_resume',
|
|
904
|
+
input: { run_id: runId },
|
|
905
|
+
method: 'POST',
|
|
906
|
+
path: `/prompt-batch/runs/${runId}/resume`,
|
|
907
|
+
},
|
|
908
|
+
];
|
|
909
|
+
}
|
|
910
|
+
//# sourceMappingURL=registry-mapping-cases-platform.js.map
|