@besales/mcp 0.40.0 → 0.41.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 +54 -9
- package/dist/auth/oauth-client.d.ts +31 -1
- package/dist/auth/oauth-client.js +37 -2
- package/dist/auth/oauth-client.js.map +1 -1
- package/dist/cli.js +13 -1
- package/dist/cli.js.map +1 -1
- package/dist/instructions/server-instructions.d.ts +1 -1
- package/dist/instructions/server-instructions.js +4 -0
- package/dist/instructions/server-instructions.js.map +1 -1
- package/dist/schemas/mcp-tools.json +222 -7
- package/dist/tools/definitions/agent-design.d.ts +7 -7
- package/dist/tools/definitions/broadcast-analytics.d.ts +3 -3
- package/dist/tools/definitions/broadcast-analytics.js +1 -0
- package/dist/tools/definitions/broadcast-analytics.js.map +1 -1
- package/dist/tools/definitions/broadcast-mailing-variants.d.ts +2 -0
- package/dist/tools/definitions/broadcast-mailing-variants.js +5 -0
- package/dist/tools/definitions/broadcast-mailing-variants.js.map +1 -1
- package/dist/tools/definitions/follow-up-funnel-test.d.ts +19 -0
- package/dist/tools/definitions/follow-up-funnel-test.js +141 -0
- package/dist/tools/definitions/follow-up-funnel-test.js.map +1 -0
- package/dist/tools/definitions/follow-up.d.ts +2 -2
- package/dist/tools/definitions/getcourse-cold-welcome.d.ts +4 -0
- package/dist/tools/definitions/getcourse-cold-welcome.js +17 -4
- package/dist/tools/definitions/getcourse-cold-welcome.js.map +1 -1
- package/dist/tools/definitions/knowledge.d.ts +2 -2
- package/dist/tools/definitions/platform-setup.d.ts +5 -5
- package/dist/tools/definitions/shared.d.ts +10 -10
- package/dist/tools/definitions.d.ts +33 -18
- package/dist/tools/definitions.js +2 -0
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/result.js +6 -1
- package/dist/tools/result.js.map +1 -1
- package/dist/types/api-contract.gen.d.ts +24684 -0
- package/dist/types/api-contract.gen.js +6 -0
- package/dist/types/api-contract.gen.js.map +1 -0
- package/package.json +1 -1
|
@@ -5,17 +5,17 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
5
5
|
description?: string | undefined;
|
|
6
6
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
7
7
|
icp_id: string;
|
|
8
|
-
mode: "
|
|
8
|
+
mode: "audio" | "text";
|
|
9
9
|
outcome_filter: ("won" | "lost" | "in_progress")[];
|
|
10
10
|
days_ago: number;
|
|
11
11
|
anonymize: boolean;
|
|
12
12
|
crm_connection_id?: string | undefined;
|
|
13
13
|
gdpr_confirmed?: boolean | undefined;
|
|
14
|
-
audio_source_type?: "
|
|
14
|
+
audio_source_type?: "xlsx_upload" | "amocrm_leads" | "onlinepbx_direct" | "bitrix_openlines" | undefined;
|
|
15
15
|
audio_source_config?: {
|
|
16
16
|
[x: string]: unknown;
|
|
17
17
|
} | undefined;
|
|
18
|
-
language?: "ru-RU" | "uz-UZ" | "kk-KZ" |
|
|
18
|
+
language?: "auto" | "ru-RU" | "uz-UZ" | "kk-KZ" | undefined;
|
|
19
19
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
20
20
|
run_id: string;
|
|
21
21
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
@@ -91,12 +91,12 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
91
91
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
92
92
|
agent_id: string;
|
|
93
93
|
version_id: string;
|
|
94
|
-
modes: ("grammar" | "
|
|
94
|
+
modes: ("grammar" | "industry" | "structure" | "completeness" | "contradictions")[];
|
|
95
95
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
96
96
|
agent_id: string;
|
|
97
97
|
operation_id: string;
|
|
98
98
|
stages: {
|
|
99
|
-
name: "grammar" | "
|
|
99
|
+
name: "grammar" | "industry" | "structure" | "aggregation";
|
|
100
100
|
output: {
|
|
101
101
|
[x: string]: unknown;
|
|
102
102
|
};
|
|
@@ -131,7 +131,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
131
131
|
run_id: string;
|
|
132
132
|
operation_id: string;
|
|
133
133
|
findings: {
|
|
134
|
-
category: "
|
|
134
|
+
category: "other" | "hallucination" | "wrong_action" | "bad_tone" | "wrong_routing" | "missed_trigger" | "wrong_pipeline_transition" | "rag_miss";
|
|
135
135
|
severity: "low" | "medium" | "critical";
|
|
136
136
|
message: string;
|
|
137
137
|
scenario_id?: string | undefined;
|
|
@@ -145,7 +145,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
145
145
|
agent_id: string;
|
|
146
146
|
operation_id: string;
|
|
147
147
|
findings: {
|
|
148
|
-
category: "
|
|
148
|
+
category: "other" | "hallucination" | "wrong_action" | "bad_tone" | "missed_context" | "contradiction" | "off_topic";
|
|
149
149
|
severity: "low" | "medium" | "critical";
|
|
150
150
|
message: string;
|
|
151
151
|
dialogue_id?: string | undefined;
|
|
@@ -226,7 +226,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
226
226
|
from: string;
|
|
227
227
|
to: string;
|
|
228
228
|
sequence_id?: string[] | undefined;
|
|
229
|
-
horizon_minutes?:
|
|
229
|
+
horizon_minutes?: 30 | 60 | 90 | 180 | 360 | 720 | 1440 | undefined;
|
|
230
230
|
segment?: string[] | undefined;
|
|
231
231
|
product?: string[] | undefined;
|
|
232
232
|
channel?: string[] | undefined;
|
|
@@ -459,7 +459,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
459
459
|
qa_min_score?: number | undefined;
|
|
460
460
|
qa_context_limit?: number | undefined;
|
|
461
461
|
max_response_symbols?: number | undefined;
|
|
462
|
-
reasoning_effort?: "
|
|
462
|
+
reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
463
463
|
verbosity?: "low" | "medium" | "high" | undefined;
|
|
464
464
|
enable_thinking?: boolean | undefined;
|
|
465
465
|
timezone?: string | undefined;
|
|
@@ -472,7 +472,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
472
472
|
} | undefined;
|
|
473
473
|
output_config?: {
|
|
474
474
|
display_name?: string | undefined;
|
|
475
|
-
response_mode?: "
|
|
475
|
+
response_mode?: "SILENT" | "TEXT" | undefined;
|
|
476
476
|
button_generator?: {
|
|
477
477
|
enabled?: boolean | undefined;
|
|
478
478
|
max_buttons?: number | undefined;
|
|
@@ -481,7 +481,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
481
481
|
} | undefined;
|
|
482
482
|
} | undefined;
|
|
483
483
|
knowledge_space_ids?: string[] | undefined;
|
|
484
|
-
agent_scope?: "
|
|
484
|
+
agent_scope?: "sale" | "reactivation" | "support" | "onboarding" | "faq" | "qualification" | "complaint" | "other" | undefined;
|
|
485
485
|
agent_variable_overrides?: {
|
|
486
486
|
custom_variable_id: string;
|
|
487
487
|
override_value: string | number | boolean;
|
|
@@ -661,7 +661,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
661
661
|
} | undefined;
|
|
662
662
|
} | undefined;
|
|
663
663
|
unavailable_message?: string | undefined;
|
|
664
|
-
bot_waiting_return_hours?: 0 | 12 | 3 | 1 |
|
|
664
|
+
bot_waiting_return_hours?: 0 | 12 | 3 | 1 | -1 | 6 | 24 | undefined;
|
|
665
665
|
follow_up_waiting_return_hours?: number | undefined;
|
|
666
666
|
skip_task_creation_on_call_operator?: boolean | undefined;
|
|
667
667
|
} | undefined;
|
|
@@ -915,7 +915,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
915
915
|
workspace_id?: string | undefined;
|
|
916
916
|
agent_id?: string | undefined;
|
|
917
917
|
channel?: string | undefined;
|
|
918
|
-
agent_scope?: "
|
|
918
|
+
agent_scope?: "sale" | "reactivation" | "support" | "onboarding" | "faq" | "qualification" | "complaint" | "other" | undefined;
|
|
919
919
|
feedback_banned_terms?: string[] | undefined;
|
|
920
920
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
921
921
|
workspace_id?: string | undefined;
|
|
@@ -984,7 +984,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
984
984
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
985
985
|
knowledge_space_id: string;
|
|
986
986
|
workspace_id?: string | undefined;
|
|
987
|
-
status?: "FAILED" | "
|
|
987
|
+
status?: "FAILED" | "COMPLETED" | "LOADED" | "SPLIT" | "EMBEDDINGS_GENERATED" | "VECTOR_DB_UPLOADED" | "TEXT_EXTRACTED" | "CHUNKS_SAVED" | undefined;
|
|
988
988
|
page?: number | undefined;
|
|
989
989
|
limit?: number | undefined;
|
|
990
990
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
@@ -1068,7 +1068,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
1068
1068
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
1069
1069
|
knowledge_space_id: string;
|
|
1070
1070
|
workspace_id?: string | undefined;
|
|
1071
|
-
status?: "PENDING" | "FAILED" | "
|
|
1071
|
+
status?: "PENDING" | "FAILED" | "PROCESSING" | "COMPLETED" | "CRAWLING" | undefined;
|
|
1072
1072
|
page?: number | undefined;
|
|
1073
1073
|
limit?: number | undefined;
|
|
1074
1074
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
@@ -1429,7 +1429,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
1429
1429
|
mode: "all" | "days" | "range";
|
|
1430
1430
|
view: "cohort" | "period";
|
|
1431
1431
|
date?: string | undefined;
|
|
1432
|
-
channel?: "Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX" |
|
|
1432
|
+
channel?: "UNKNOWN" | "Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX" | undefined;
|
|
1433
1433
|
import_job_id?: string | undefined;
|
|
1434
1434
|
page?: number | undefined;
|
|
1435
1435
|
page_size?: number | undefined;
|
|
@@ -1454,7 +1454,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
1454
1454
|
product?: string | string[] | undefined;
|
|
1455
1455
|
product_mode?: "none" | undefined;
|
|
1456
1456
|
freshness?: "0-7" | "8-14" | "15-30" | "31+" | ("0-7" | "8-14" | "15-30" | "31+")[] | undefined;
|
|
1457
|
-
channels?: "Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX" | "UNKNOWN" |
|
|
1457
|
+
channels?: "UNKNOWN" | "Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX" | ("UNKNOWN" | "Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX")[] | undefined;
|
|
1458
1458
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
1459
1459
|
mode: "all" | "days" | "range";
|
|
1460
1460
|
view: "cohort" | "period";
|
|
@@ -1471,7 +1471,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
1471
1471
|
product?: string | string[] | undefined;
|
|
1472
1472
|
product_mode?: "none" | undefined;
|
|
1473
1473
|
freshness?: "0-7" | "8-14" | "15-30" | "31+" | ("0-7" | "8-14" | "15-30" | "31+")[] | undefined;
|
|
1474
|
-
channels?: "Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX" | "UNKNOWN" |
|
|
1474
|
+
channels?: "UNKNOWN" | "Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX" | ("UNKNOWN" | "Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX")[] | undefined;
|
|
1475
1475
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
1476
1476
|
workspace_id?: string | undefined;
|
|
1477
1477
|
mailing_variant_id?: string | undefined;
|
|
@@ -1488,6 +1488,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
1488
1488
|
default_funnel?: string | null | undefined;
|
|
1489
1489
|
default_platform_id?: string | null | undefined;
|
|
1490
1490
|
default_channels?: ("Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX")[] | undefined;
|
|
1491
|
+
cold_welcome_channels?: ("Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX")[] | undefined;
|
|
1491
1492
|
default_deal_fields?: Record<string, string | number | boolean | null> | null | undefined;
|
|
1492
1493
|
workspace_id?: string | undefined;
|
|
1493
1494
|
description?: string | undefined;
|
|
@@ -1502,6 +1503,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
1502
1503
|
default_funnel?: string | null | undefined;
|
|
1503
1504
|
default_platform_id?: string | null | undefined;
|
|
1504
1505
|
default_channels?: ("Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX")[] | undefined;
|
|
1506
|
+
cold_welcome_channels?: ("Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX")[] | undefined;
|
|
1505
1507
|
default_deal_fields?: Record<string, string | number | boolean | null> | null | undefined;
|
|
1506
1508
|
workspace_id?: string | undefined;
|
|
1507
1509
|
name?: string | undefined;
|
|
@@ -1518,6 +1520,8 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
1518
1520
|
contact_id: string;
|
|
1519
1521
|
deal_id?: string | undefined;
|
|
1520
1522
|
}[] | undefined;
|
|
1523
|
+
mailing_variant_id?: string | undefined;
|
|
1524
|
+
channels?: ("Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX")[] | undefined;
|
|
1521
1525
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
1522
1526
|
explicit_confirmation: true;
|
|
1523
1527
|
workspace_id?: string | undefined;
|
|
@@ -1533,6 +1537,7 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
1533
1537
|
segment?: string | undefined;
|
|
1534
1538
|
product_code?: string | undefined;
|
|
1535
1539
|
funnel?: string | undefined;
|
|
1540
|
+
channels?: ("Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX")[] | undefined;
|
|
1536
1541
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
1537
1542
|
segments: {
|
|
1538
1543
|
contacts: {
|
|
@@ -1549,10 +1554,20 @@ export declare const toolDefinitions: (import("./definitions/shared.js").ToolDef
|
|
|
1549
1554
|
platform_id?: string | undefined;
|
|
1550
1555
|
message?: string | undefined;
|
|
1551
1556
|
mailing_variant_id?: string | undefined;
|
|
1557
|
+
channels?: ("Site" | "Email" | "SMS" | "Telegram" | "Facebook" | "VK" | "Chatium" | "WhatsApp" | "Viber" | "MAX")[] | undefined;
|
|
1552
1558
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
1553
1559
|
batch_id: string;
|
|
1554
1560
|
explicit_confirmation: true;
|
|
1555
1561
|
workspace_id?: string | undefined;
|
|
1562
|
+
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
1563
|
+
chat_user_id: string;
|
|
1564
|
+
workspace_id?: string | undefined;
|
|
1565
|
+
funnel_id?: string | undefined;
|
|
1566
|
+
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
1567
|
+
run_id: string;
|
|
1568
|
+
explicit_confirmation: true;
|
|
1569
|
+
confirmation_reason: string;
|
|
1570
|
+
workspace_id?: string | undefined;
|
|
1556
1571
|
}> | import("./definitions/shared.js").ToolDefinition<{
|
|
1557
1572
|
platform_id: string;
|
|
1558
1573
|
cursor?: string | undefined;
|
|
@@ -11,6 +11,7 @@ import { broadcastAnalyticsTools, broadcastLaunchTools, } from './definitions/br
|
|
|
11
11
|
import { broadcastMailingVariantTools } from './definitions/broadcast-mailing-variants.js';
|
|
12
12
|
import { getcourseColdWelcomeTools } from './definitions/getcourse-cold-welcome.js';
|
|
13
13
|
import { followUpTools } from './definitions/follow-up.js';
|
|
14
|
+
import { followUpFunnelTestTools } from './definitions/follow-up-funnel-test.js';
|
|
14
15
|
import { dialogueAuditTools } from './definitions/dialogue-audit.js';
|
|
15
16
|
import { linkTrackingTools } from './definitions/link-tracking.js';
|
|
16
17
|
import { scheduledTaskTools } from './definitions/scheduled-tasks.js';
|
|
@@ -26,6 +27,7 @@ export const toolDefinitions = [
|
|
|
26
27
|
...dialogueExportTools,
|
|
27
28
|
...broadcastAnalyticsTools,
|
|
28
29
|
...followUpTools,
|
|
30
|
+
...followUpFunnelTestTools,
|
|
29
31
|
...scheduledTaskTools,
|
|
30
32
|
...broadcastMailingVariantTools,
|
|
31
33
|
...getcourseColdWelcomeTools,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;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AO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,GAAG,gBAAgB;IACnB,GAAG,kBAAkB;IACrB,GAAG,cAAc;IACjB,GAAG,gBAAgB;IACnB,GAAG,eAAe;IAClB,GAAG,YAAY;IACf,GAAG,oBAAoB;IACvB,GAAG,uBAAuB;IAC1B,GAAG,mBAAmB;IACtB,GAAG,uBAAuB;IAC1B,GAAG,aAAa;IAChB,GAAG,uBAAuB;IAC1B,GAAG,kBAAkB;IACrB,GAAG,4BAA4B;IAC/B,GAAG,yBAAyB;IAC5B,GAAG,oBAAoB;IACvB,GAAG,kBAAkB;IACrB,GAAG,iBAAiB;CACrB,CAAC"}
|
package/dist/tools/result.js
CHANGED
|
@@ -59,7 +59,12 @@ function mapApiClientError(error, restartToolName, workspaceId) {
|
|
|
59
59
|
: 'Animaly rejected stored credentials. Run `besales-mcp connect` again.');
|
|
60
60
|
}
|
|
61
61
|
if (error.status === 403) {
|
|
62
|
-
|
|
62
|
+
// Сообщение бэкенда НАЗЫВАЕТ недостающий scope, и оно важнее нашей догадки: композит
|
|
63
|
+
// `mcp:*` покрывает не все эндпоинты (например, cold-welcome требует `read:campaigns`),
|
|
64
|
+
// и подсказка про `mcp:*`/`mcp:platform-setup` там уводит в ложный диагноз «ключ не тот».
|
|
65
|
+
return errorToolResult(error.responseMessage
|
|
66
|
+
? `Animaly rejected this request: ${error.responseMessage}`
|
|
67
|
+
: 'Animaly rejected this request: the stored key lacks the scope this endpoint requires.');
|
|
63
68
|
}
|
|
64
69
|
if (error.status === 410) {
|
|
65
70
|
return errorToolResult(restartToolName
|
package/dist/tools/result.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../src/tools/result.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,GAET,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;aACrC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,OAAO;aACd;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,KAAc,EACd,eAAwB,EACxB,WAAoB;IAEpB,IAAI,KAAK,YAAY,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,aAAa,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