@sendinel/mcp-server 1.0.35 → 1.0.36
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { decodeHtmlEntities, stripHtmlComments } from '@sendinel/domain';
|
|
1
2
|
import { db, requestContext } from '../db.js';
|
|
2
3
|
import { getProjectId } from '../project.js';
|
|
3
4
|
import { fireWebhookEvent } from './webhook-events.js';
|
|
@@ -131,12 +132,14 @@ export function currentChannelContext() {
|
|
|
131
132
|
}
|
|
132
133
|
/** Tag-stripped, whitespace-collapsed, length-capped text. HTML is untrusted input. */
|
|
133
134
|
export function approvalExcerpt(html, max = 200) {
|
|
134
|
-
|
|
135
|
+
// Outlook-only comment content ("96") is dropped and character codes decoded, so an approver
|
|
136
|
+
// reads the email the way a recipient does.
|
|
137
|
+
const text = decodeHtmlEntities(stripHtmlComments(String(html ?? ''))
|
|
135
138
|
.replace(/<style[\s\S]*?<\/style>/gi, ' ')
|
|
136
139
|
.replace(/<script[\s\S]*?<\/script>/gi, ' ')
|
|
137
|
-
.replace(/<[
|
|
138
|
-
.replace(
|
|
139
|
-
.replace(
|
|
140
|
+
.replace(/<title[\s\S]*?<\/title>/gi, ' ')
|
|
141
|
+
.replace(/<[^>]+>/g, ' '))
|
|
142
|
+
.replace(/[\s\u00A0\u2002\u2003\u2009\u200A]+/g, ' ')
|
|
140
143
|
.trim();
|
|
141
144
|
return text.length > max ? `${text.slice(0, max - 1)}…` : text;
|
|
142
145
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendinel/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.36",
|
|
4
4
|
"description": "AI-controlled email operations control plane for campaigns, contacts, segments, analytics, and multi-provider sending via MCP.",
|
|
5
5
|
"mcpName": "ai.sendinel/mcp-server",
|
|
6
6
|
"type": "module",
|