@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
package/dist/instructions.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { KEYS_PAGE, } from './connection.js';
|
|
2
|
+
import { pageName } from './dashboard-words.js';
|
|
2
3
|
import { INDEX_URI } from './docs.js';
|
|
3
4
|
import { grantNote, LIVE_NOTE, SIMULATOR_NOTE, WRITES_OFF_NOTE } from './tools/server.js';
|
|
4
5
|
const ABOUT = "Sendora is a transactional email service: an HTTP API, SMTP submission, SDKs for TypeScript (@sendora/sdk), Python (sendora), PHP (sendora/sendora-php, and sendora/sendora-laravel for Laravel), Java (se.sendora:sendora-java), .NET (Sendora, and Sendora.AspNetCore for ASP.NET Core) and Go (sendora.se/go/sendora), signed webhooks and a message log with every delivery event. This server carries Sendora's documentation, and with a key, tools for that key's server or account.";
|
|
@@ -7,7 +8,7 @@ const KEYS = 'Never print or repeat a Sendora key, and never write one into a fi
|
|
|
7
8
|
const TEST_DASHBOARD = `A person makes and revokes this server's keys in the dashboard, ${KEYS_PAGE}.`;
|
|
8
9
|
const LIVE_DASHBOARD = `A person makes and revokes this server's keys, and makes and deletes its webhooks, in the dashboard, ${KEYS_PAGE}, with changes on or off, since a new key or signing secret must not reach this conversation.`;
|
|
9
10
|
const ACCOUNT_DASHBOARD = `A server and a key are made in the dashboard, ${KEYS_PAGE}, since a new key is a secret this conversation must not see; a live server is deleted there too.`;
|
|
10
|
-
const GRANT_LIMITS = `Through a connected app, webhooks and what cannot be undone happen on test servers alone, and the account is read only. A person makes and revokes keys, and does the rest, in the dashboard, ${KEYS_PAGE}. The person sees and ends this connection in the dashboard's user menu, under
|
|
11
|
+
const GRANT_LIMITS = `Through a connected app, webhooks and what cannot be undone happen on test servers alone, and the account is read only. A person makes and revokes keys, and does the rest, in the dashboard, ${KEYS_PAGE}. The person sees and ends this connection in the dashboard's user menu, under ${pageName('apps')}.`;
|
|
11
12
|
function serverName(connection) {
|
|
12
13
|
return connection.server === undefined
|
|
13
14
|
? `a ${connection.kind} server the API could not name when this connection opened`
|
package/dist/prompts.js
CHANGED
|
@@ -23,7 +23,7 @@ export function registerPrompts(server) {
|
|
|
23
23
|
}, ({ framework }) => asking([
|
|
24
24
|
`Set up Sendora for transactional email in this project, which uses ${forFramework(framework)}.`,
|
|
25
25
|
'',
|
|
26
|
-
"1. Read sendora://docs/quickstart and the skill for the project's SDK, sendora://sdk/skill for TypeScript, sendora://sdk/python/skill for Python, sendora://sdk/php/skill for PHP, sendora://sdk/java/skill for Java or Kotlin, sendora://sdk/dotnet/skill for .NET or sendora://sdk/go/skill for Go, with read_doc before writing any code, and follow the skill's rules. In a Laravel app, read sendora://docs/laravel and sendora://sdk/laravel/readme too, in a Symfony app sendora://docs/symfony, in a Django app sendora://docs/django, in a Next.js app sendora://docs/nextjs, in an Express app sendora://docs/express, in a Gin app sendora://docs/gin, in an Echo app sendora://docs/echo and in a Fiber app sendora://docs/fiber.",
|
|
26
|
+
"1. Read sendora://docs/quickstart and the skill for the project's SDK, sendora://sdk/skill for TypeScript, sendora://sdk/python/skill for Python, sendora://sdk/php/skill for PHP, sendora://sdk/java/skill for Java or Kotlin, sendora://sdk/dotnet/skill for .NET or sendora://sdk/go/skill for Go, with read_doc before writing any code, and follow the skill's rules. In a Laravel app, read sendora://docs/laravel and sendora://sdk/laravel/readme too, in a Symfony app sendora://docs/symfony, in a Django app sendora://docs/django, in a Next.js app sendora://docs/nextjs, in an Express app sendora://docs/express, in an ASP.NET Core app sendora://docs/aspnet-core, in a Gin app sendora://docs/gin, in an Echo app sendora://docs/echo and in a Fiber app sendora://docs/fiber.",
|
|
27
27
|
"2. Install the SDK for the project's language, @sendora/sdk for TypeScript or JavaScript, sendora for Python, sendora/sendora-php for PHP, sendora/sendora-laravel in a Laravel app, se.sendora:sendora-java for Java or Kotlin, the NuGet package Sendora for .NET 10 or newer, with Sendora.AspNetCore in an ASP.NET Core app, or sendora.se/go/sendora for Go, and construct the client once at startup from SENDORA_API_TOKEN in the environment; in any other language, call the HTTP API with that key. Take the Java SDK from Sendora's own Maven repository, https://maven.sendora.se, for the group se.sendora alone, and add the signature check that sendora://sdk/java/readme shows. In a .NET app with a host, register the client with builder.Services.AddSendora(builder.Configuration), which reads the same variable. Never write a key into a file under version control, and never print one.",
|
|
28
28
|
'3. Add a function that sends one message, with the idempotency the SDK gives every send, or an Idempotency-Key header over HTTP.',
|
|
29
29
|
'4. If a test server key is connected here, send a test to delivered@simulator.sendora.se and to hardbounce@simulator.sendora.se, and show me how each ended; otherwise tell me how to connect one (sendora://docs/test-servers).',
|
|
@@ -61,7 +61,7 @@ export function registerPrompts(server) {
|
|
|
61
61
|
"- In a Laravel app, the package's route, which checks each signature and fires a Laravel event, as sendora://docs/laravel shows.",
|
|
62
62
|
"- In a Symfony app, SendoraRequestParser through Symfony's Webhook component, as sendora://docs/symfony shows.",
|
|
63
63
|
'- In Java or Kotlin, WebhookVerifier.of(secret).verify() with the raw body as bytes and the header.',
|
|
64
|
-
"- In an ASP.NET Core app, MapSendoraWebhooks from Sendora.AspNetCore, which checks each signature and calls your SendoraWebhookHandler's method for the event. It reads the secret from the setting Sendora:WebhookSecret, which the variable Sendora__WebhookSecret sets.",
|
|
64
|
+
"- In an ASP.NET Core app, MapSendoraWebhooks from Sendora.AspNetCore, which checks each signature and calls your SendoraWebhookHandler's method for the event, as sendora://docs/aspnet-core shows. It reads the secret from the setting Sendora:WebhookSecret, which the variable Sendora__WebhookSecret sets.",
|
|
65
65
|
'- In any other .NET app, new WebhookVerifier(secret).Verify() with the raw body as bytes and the header.',
|
|
66
66
|
'- In Go, the http.Handler from sendora.NewWebhookHandler on net/http, as sendora://docs/gin shows in a Gin route through gin.WrapH and sendora://docs/echo in an Echo route through echo.WrapHandler, and elsewhere sendora.VerifyWebhook with the raw body as bytes, the header and the secret, as sendora://docs/fiber shows in a Fiber route with c.BodyRaw().',
|
|
67
67
|
'- In any other language, the recipe in sendora://docs/webhooks.',
|
package/dist/tools/server.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { ALLOW_CHANGES } from '../dashboard-words.js';
|
|
2
3
|
import { toolError } from '../errors.js';
|
|
3
4
|
import { registerServerTool } from '../target.js';
|
|
4
5
|
import { READING } from '../tool.js';
|
|
@@ -7,7 +8,7 @@ export const SIMULATOR_NOTE = `Nothing sent from this test server is delivered.
|
|
|
7
8
|
export const LIVE_NOTE = 'This is a live server: mail sent from it reaches real people, and the log and the suppression list hold real addresses.';
|
|
8
9
|
export const WRITES_OFF_NOTE = "Changes are off for this connection, so it only reads. The user turns them on with --allow-writes (or SENDORA_ALLOW_WRITES=true) where the server runs locally, or the header 'Sendora-Allow-Writes: true' on the hosted server.";
|
|
9
10
|
/** A connected app's WRITES_OFF_NOTE: the person chose when they approved it. */
|
|
10
|
-
const LIVE_READS_NOTE =
|
|
11
|
+
const LIVE_READS_NOTE = `The person who approved this connection allowed no changes on live servers, so it only reads this one. They can connect the app again and tick ${ALLOW_CHANGES} on the approval page.`;
|
|
11
12
|
/** What a connected app's connection reaches, which its instructions and get_server name. */
|
|
12
13
|
export function grantNote(grant) {
|
|
13
14
|
const servers = grant.servers
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** This package's version, held equal to its package.json by a test. */
|
|
2
|
-
export const MCP_VERSION = '2.0.
|
|
2
|
+
export const MCP_VERSION = '2.0.17';
|