@sendinel/mcp-server 1.0.208 → 1.0.210
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.
|
@@ -365,7 +365,11 @@ export async function requestApproval(action, params, apiKeyId, channelContext,
|
|
|
365
365
|
const detailSummary = buildApprovalSummary(action, frozenParams, display);
|
|
366
366
|
const preview = buildApprovalPreview({ action, params: frozenParams, summary: detailSummary,
|
|
367
367
|
...(display && 'recipient_count' in display ? { recipientCount: display.recipient_count } : {}) });
|
|
368
|
-
const
|
|
368
|
+
const consequence = preview.plain_summary.split('\n')[0];
|
|
369
|
+
// Named snapshot summaries already include the consequence from the preview builder.
|
|
370
|
+
const summary = detailSummary.split('\n')[0] === consequence
|
|
371
|
+
? detailSummary
|
|
372
|
+
: `${consequence}\n${detailSummary}`;
|
|
369
373
|
const { data, error } = await approvalStore()
|
|
370
374
|
.from('action_approvals')
|
|
371
375
|
.insert({
|
|
@@ -409,7 +413,7 @@ export async function requestApproval(action, params, apiKeyId, channelContext,
|
|
|
409
413
|
}
|
|
410
414
|
catch { /* Missing display data omits the project line. */ }
|
|
411
415
|
const approveUrl = approvalPageUrl(data.id);
|
|
412
|
-
const previewText = buildApprovalPreview({ action, params: frozenParams, summary, projectName, ...(display && 'recipient_count' in display ? { recipientCount: display.recipient_count } : {}) }).plain_summary;
|
|
416
|
+
const previewText = buildApprovalPreview({ action, params: frozenParams, summary: detailSummary, projectName, ...(display && 'recipient_count' in display ? { recipientCount: display.recipient_count } : {}) }).plain_summary;
|
|
413
417
|
if (sandboxApproved) {
|
|
414
418
|
return { requires_approval: true, approval_id: data.id, tier, action, summary, expires_at: expiresAt,
|
|
415
419
|
approve_via: 'sandbox', decided_via: 'sandbox', decided_by: null, approve_url: approveUrl, preview_text: previewText, decision_status: 'approved',
|
|
@@ -431,7 +435,7 @@ export async function requestApproval(action, params, apiKeyId, channelContext,
|
|
|
431
435
|
approve_url: approveUrl,
|
|
432
436
|
preview_text: previewText,
|
|
433
437
|
message: `${previewText}\nTap to approve: ${approveUrl}\nIt stays open for 24 hours. ${effective.channelRule === 'human_only' ? 'Use the dashboard link or a typed chat reply.' : 'In a terminal with prompts you can also answer the on-screen Accept/Decline.'}${chatGuidance}\nAfter approval: ${approvalRetryInstruction(action)}`,
|
|
434
|
-
}, { action, params: frozenParams, summary, projectName, channelRule: effective.channelRule }, getProjectId());
|
|
438
|
+
}, { action, params: frozenParams, summary: detailSummary, projectName, channelRule: effective.channelRule }, getProjectId());
|
|
435
439
|
if (result.decision_status === 'approved') {
|
|
436
440
|
return { ...result, message: approvalNext(action, result) };
|
|
437
441
|
}
|
package/build/tools/campaigns.js
CHANGED
|
@@ -1586,8 +1586,8 @@ export function registerCampaignTools(server) {
|
|
|
1586
1586
|
message: executed.grouped && executed.alreadySent
|
|
1587
1587
|
? `${executed.enrolled} ${payload.send_at ? `scheduled at ${payload.send_at}` : 'sent now'}; ${executed.alreadySent} skipped because they already received it.`
|
|
1588
1588
|
: payload.send_at
|
|
1589
|
-
? `Scheduled: "${payload.subject}" goes to ${executed.enrolled} people at ${payload.send_at}.`
|
|
1590
|
-
: `Sending: "${payload.subject}" is going to ${executed.enrolled} people now. Delivery happens over the next few minutes; check the campaign for results.`,
|
|
1589
|
+
? `Scheduled: "${payload.subject}" goes to ${executed.enrolled} ${executed.enrolled === 1 ? 'person' : 'people'} at ${payload.send_at}.`
|
|
1590
|
+
: `Sending: "${payload.subject}" is going to ${executed.enrolled} ${executed.enrolled === 1 ? 'person' : 'people'} now. Delivery happens over the next few minutes; check the campaign for results.`,
|
|
1591
1591
|
});
|
|
1592
1592
|
}
|
|
1593
1593
|
// ── Call 2: execute exactly the approved, frozen payload. Nothing else is trusted. ──
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendinel/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.210",
|
|
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",
|