@sendinel/mcp-server 1.0.60 → 1.0.62

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.
@@ -280,12 +280,17 @@ Respond with JSON: { "subject": "...", "blocks": [...], "body_text": "..." }`,
280
280
  const queueCounts = {};
281
281
  for (const row of queueStatus.data ?? [])
282
282
  queueCounts[row.status] = (queueCounts[row.status] ?? 0) + 1;
283
- const domainIssues = (domainHealth.data ?? []).filter((row) => row.spf_valid !== true || row.dkim_valid !== true || row.dmarc_valid !== true);
283
+ const authLabel = (v) => (v === true ? true : v === false ? false : 'not checked yet');
284
+ const labelAuth = (row) => ({ ...row, spf_valid: authLabel(row.spf_valid), dkim_valid: authLabel(row.dkim_valid), dmarc_valid: authLabel(row.dmarc_valid) });
285
+ const domainRows = (domainHealth.data ?? []);
286
+ const failing = (row) => row.spf_valid === false || row.dkim_valid === false || row.dmarc_valid === false;
287
+ const domainIssues = domainRows.filter(failing).map(labelAuth);
288
+ const domainNotChecked = domainRows.filter((row) => !failing(row) && (row.spf_valid == null || row.dkim_valid == null || row.dmarc_valid == null)).map(labelAuth);
284
289
  const diagnosticData = {
285
290
  cron: { total_recent: cronRuns.data?.length ?? 0, failures: cronFailures.length, failed_jobs: cronFailures },
286
291
  queue: queueCounts,
287
292
  dlq: { unresolved_count: dlq.data?.length ?? 0, samples: (dlq.data ?? []).slice(0, 3) },
288
- domain_health: { sites_with_issues: domainIssues.length, issues: domainIssues.slice(0, 5) },
293
+ domain_health: { sites_with_issues: domainIssues.length, issues: domainIssues.slice(0, 5), not_checked_yet: domainNotChecked.slice(0, 5) },
289
294
  };
290
295
  const analysisMsg = await getAnthropicClient().messages.create({
291
296
  model: getAnthropicFastModelId(),
@@ -1391,7 +1391,7 @@ Requirements: urgency without desperation, acknowledge the gap, one clear CTA, v
1391
1391
  .from('email_log')
1392
1392
  .select('id, to_email, from_email, subject, status, category, sent_at, delivered_at, opened_at, clicked_at, bounced_at, bounce_type, complained_at, error_message, site_id, campaign_id, created_at')
1393
1393
  .eq('project_id', getProjectId())
1394
- .order('sent_at', { ascending: false })
1394
+ .order('sent_at', { ascending: false, nullsFirst: false })
1395
1395
  .order('id', { ascending: false })
1396
1396
  .range(start, start + pageSize);
1397
1397
  if (site_id)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendinel/mcp-server",
3
- "version": "1.0.60",
3
+ "version": "1.0.62",
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",