@sendora/mcp 2.0.15 → 2.0.17
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/dist/dashboard-words.js +28 -0
- package/dist/errors.js +11 -10
- package/dist/generated/docs.json +1 -1
- package/dist/generated/screens/domain-records.html +1 -1
- package/dist/generated/screens/message-timeline.html +1 -1
- package/dist/instructions.js +2 -1
- package/dist/prompts.js +2 -2
- package/dist/tools/server.js +2 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A person reads the dashboard in Swedish or English, so a hint gives its
|
|
3
|
+
* words in both. The pages restate `pageNames` from packages/domain, which
|
|
4
|
+
* this published package cannot import.
|
|
5
|
+
*/
|
|
6
|
+
const sv = {
|
|
7
|
+
accountKeys: 'Konto › Kontonycklar',
|
|
8
|
+
apps: 'Anslutna appar',
|
|
9
|
+
billing: 'Konto › Fakturering',
|
|
10
|
+
domains: 'Domäner',
|
|
11
|
+
streamSettings: 'Inställningar',
|
|
12
|
+
suppressions: 'Spärrlista',
|
|
13
|
+
usage: 'Konto › Användning',
|
|
14
|
+
};
|
|
15
|
+
const en = {
|
|
16
|
+
accountKeys: 'Account › Account keys',
|
|
17
|
+
apps: 'Connected apps',
|
|
18
|
+
billing: 'Account › Billing',
|
|
19
|
+
domains: 'Domains',
|
|
20
|
+
streamSettings: 'Settings',
|
|
21
|
+
suppressions: 'Suppressions',
|
|
22
|
+
usage: 'Account › Usage',
|
|
23
|
+
};
|
|
24
|
+
export const dashboardPages = { sv, en };
|
|
25
|
+
export function pageName(page) {
|
|
26
|
+
return `${en[page]} (${sv[page]})`;
|
|
27
|
+
}
|
|
28
|
+
export const ALLOW_CHANGES = '"Allow changes on live servers" ("Tillåt ändringar på liveservrar")';
|
package/dist/errors.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { SendoraError } from '@sendora/sdk';
|
|
2
2
|
import { ACCOUNT_KEYS_PAGE, KEYS_PAGE } from './connection.js';
|
|
3
|
+
import { ALLOW_CHANGES, pageName } from './dashboard-words.js';
|
|
3
4
|
const DASHBOARD = 'https://app.sendora.se';
|
|
4
5
|
const retryAfter = (error) => error.retryAfter === null
|
|
5
6
|
? 'Wait a moment and try again.'
|
|
6
7
|
: `Wait ${String(error.retryAfter)} seconds and try again.`;
|
|
7
8
|
const unconfirmed = () => 'Nothing was confirmed, so a send may or may not have been accepted: look for it with search_messages before sending again.';
|
|
8
9
|
const capOwner = {
|
|
9
|
-
account: `An administrator raises the account's ceiling under
|
|
10
|
+
account: `An administrator raises the account's ceiling under ${pageName('usage')} in the dashboard, ${DASHBOARD}/account/usage, or upgrades an account on the Free plan to Pro there. After a cancellation, the cap is the emails that the monthly fee includes, and only undoing the cancellation there lifts it.`,
|
|
10
11
|
server: "The server's own cap is Sendora's to set; write to support to change it.",
|
|
11
12
|
test: "It is the cap the account's test servers share, which Sendora sets.",
|
|
12
13
|
};
|
|
@@ -18,17 +19,17 @@ const capOwner = {
|
|
|
18
19
|
const hints = {
|
|
19
20
|
invalid_request: null,
|
|
20
21
|
unauthorized: (_error, connection) => connection.kind === 'grant'
|
|
21
|
-
? `This connection has ended, or the person who approved it may no longer open this server. They see their connections in the dashboard's user menu, under
|
|
22
|
-
: `The key was revoked or mistyped. A server key is made under its server in the dashboard, ${KEYS_PAGE}, and an account key by an administrator under
|
|
22
|
+
? `This connection has ended, or the person who approved it may no longer open this server. They see their connections in the dashboard's user menu, under ${pageName('apps')}, ${DASHBOARD}/account/apps, and can connect the app again.`
|
|
23
|
+
: `The key was revoked or mistyped. A server key is made under its server in the dashboard, ${KEYS_PAGE}, and an account key by an administrator under ${pageName('accountKeys')}, ${ACCOUNT_KEYS_PAGE}; restart the connection with the new one.`,
|
|
23
24
|
wrong_token_kind: null,
|
|
24
25
|
not_for_connections: null,
|
|
25
|
-
read_only_connection: () =>
|
|
26
|
+
read_only_connection: () => `The person approved this connection without changes on live servers, and the account is read only through a connection. They can connect again and tick ${ALLOW_CHANGES} on the approval page, or the change can be made on a test server.`,
|
|
26
27
|
test_server_only: () => 'Through a connected app, webhooks and what cannot be undone happen on test servers only. Make the change on a test server, or in the dashboard.',
|
|
27
28
|
payment_required: null,
|
|
28
29
|
account_paused: null,
|
|
29
30
|
account_not_active: null,
|
|
30
31
|
tracking_unavailable: null,
|
|
31
|
-
tracking_not_confirmed: () => `Send without trackOpens and trackLinks set to true until an administrator has switched tracking on under a stream's
|
|
32
|
+
tracking_not_confirmed: () => `Send without trackOpens and trackLinks set to true until an administrator has switched tracking on under a stream's ${pageName('streamSettings')} tab in the dashboard, ${DASHBOARD}/servers.`,
|
|
32
33
|
spam_complaint_locked: null,
|
|
33
34
|
unsubscribe_locked: null,
|
|
34
35
|
not_found: null,
|
|
@@ -36,7 +37,7 @@ const hints = {
|
|
|
36
37
|
domain_reserved: null,
|
|
37
38
|
inbound_domain_exists: null,
|
|
38
39
|
tracking_domain_exists: (error) => `list_tracking_domains shows its record, and check_tracking_domain looks it up now${error.existingId === null ? '' : ` by its trackingDomainId, ${error.existingId}`}.`,
|
|
39
|
-
unverified_domain_limit: () => `list_domains shows which are not verified, and check_domain looks one's records up now. An administrator removes one under
|
|
40
|
+
unverified_domain_limit: () => `list_domains shows which are not verified, and check_domain looks one's records up now. An administrator removes one under ${pageName('domains')} in the dashboard, ${DASHBOARD}/domains.`,
|
|
40
41
|
tracking_domain_limit: null,
|
|
41
42
|
tracking_host_is_sending_domain: null,
|
|
42
43
|
tracking_host_not_verified: () => 'list_domains shows which sending domains are verified.',
|
|
@@ -56,8 +57,8 @@ const hints = {
|
|
|
56
57
|
server_in_flight: null,
|
|
57
58
|
request_too_large: null,
|
|
58
59
|
from_domain_not_verified: (_error, connection) => connection.kind === 'grant'
|
|
59
|
-
? `The from address's domain must be one of the account's sending domains that get_server lists as sendingDomains. An administrator adds one, which is the account's and not a server's, under
|
|
60
|
-
: `The from address's domain must be one of the account's sending domains that get_server lists as sendingDomains. To add one, which is the account's and not a server's: with the account key, add_domain adds it and answers the DNS records to publish, and check_domain looks them up; or an administrator adds it under
|
|
60
|
+
? `The from address's domain must be one of the account's sending domains that get_server lists as sendingDomains. An administrator adds one, which is the account's and not a server's, under ${pageName('domains')} in the dashboard, ${DASHBOARD}/domains.`
|
|
61
|
+
: `The from address's domain must be one of the account's sending domains that get_server lists as sendingDomains. To add one, which is the account's and not a server's: with the account key, add_domain adds it and answers the DNS records to publish, and check_domain looks them up; or an administrator adds it under ${pageName('domains')} in the dashboard, ${DASHBOARD}/domains.`,
|
|
61
62
|
stream_not_found: null,
|
|
62
63
|
stream_archived: null,
|
|
63
64
|
stream_paused: null,
|
|
@@ -69,7 +70,7 @@ const hints = {
|
|
|
69
70
|
list_unsubscribe_reserved: null,
|
|
70
71
|
content_expired: null,
|
|
71
72
|
content_unreadable: null,
|
|
72
|
-
recipient_suppressed: (error) => `${error.suppressed.map(({ address, reason }) => `${address} (${reason})`).join(', ')} ${error.suppressed.length === 1 ? 'is' : 'are'} on the stream's suppression list, which list_suppressions reads. A hard bounce or a manual suppression can be lifted with remove_suppression, or under the stream's
|
|
73
|
+
recipient_suppressed: (error) => `${error.suppressed.map(({ address, reason }) => `${address} (${reason})`).join(', ')} ${error.suppressed.length === 1 ? 'is' : 'are'} on the stream's suppression list, which list_suppressions reads. A hard bounce or a manual suppression can be lifted with remove_suppression, or under the stream's ${pageName('suppressions')} in the dashboard; a spam complaint or an unsubscribe cannot, since the recipient asked.`,
|
|
73
74
|
test_address_on_live_server: (_error, connection) => connection.kind === 'grant'
|
|
74
75
|
? 'The addresses at simulator.sendora.se act out outcomes on a test server only, and a live server refuses them: send to them from a test server this connection reaches, named in server.'
|
|
75
76
|
: 'The addresses at simulator.sendora.se act out outcomes on a test server only, and a live server refuses them: send to them with a test server key (sk_test_).',
|
|
@@ -78,7 +79,7 @@ const hints = {
|
|
|
78
79
|
idempotency_key_mismatch: null,
|
|
79
80
|
idempotency_key_required: null,
|
|
80
81
|
rate_limited: retryAfter,
|
|
81
|
-
daily_cap_reached: (error) => `The daily cap${error.cap === null ? '' : ` of ${String(error.cap)}`} is used up until ${error.resetsAt ?? 'midnight in UTC'}, and a send before then fails the same way. On the Free plan, an administrator lifts it by upgrading to Pro under
|
|
82
|
+
daily_cap_reached: (error) => `The daily cap${error.cap === null ? '' : ` of ${String(error.cap)}`} is used up until ${error.resetsAt ?? 'midnight in UTC'}, and a send before then fails the same way. On the Free plan, an administrator lifts it by upgrading to Pro under ${pageName('usage')} in the dashboard, ${DASHBOARD}/account/usage. While an invoice is unpaid, paying it under ${pageName('billing')} lifts it.`,
|
|
82
83
|
monthly_cap_reached: (error) => `The monthly cap${error.cap === null ? '' : ` of ${String(error.cap)}`} is used up until ${error.resetsAt ?? 'the month ends'}. ${capOwner[error.scope ?? 'account']}`,
|
|
83
84
|
sending_disabled: retryAfter,
|
|
84
85
|
connection_failed: unconfirmed,
|