@sendinel/mcp-server 1.0.57 → 1.0.58

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 { anthropicResponseText } from '@sendinel/domain';
1
2
  import { z } from 'zod';
2
3
  import Anthropic from '@anthropic-ai/sdk';
3
4
  import { adminDb, db } from '../db.js';
@@ -99,7 +100,7 @@ Do not include body_html. Sendinel renders body_html from blocks.
99
100
  Respond with a JSON array.`,
100
101
  }],
101
102
  });
102
- const raw = msg.content[0].text;
103
+ const raw = anthropicResponseText(msg);
103
104
  steps = extractJsonArray(raw).map((step, index) => {
104
105
  const blocks = normalizeComposerBlocks(step.blocks, brandVisual.resolvedButtonColor);
105
106
  return {
@@ -208,7 +209,7 @@ Do not include body_html. Sendinel renders body_html from blocks.
208
209
  Respond with JSON: { "subject": "...", "blocks": [...], "body_text": "..." }`,
209
210
  }],
210
211
  });
211
- const raw = msg.content[0].text;
212
+ const raw = anthropicResponseText(msg);
212
213
  const parsed = extractJsonObject(raw);
213
214
  const blocks = normalizeComposerBlocks(parsed.blocks, brandVisual.resolvedButtonColor);
214
215
  if (!blocks.length)
@@ -300,7 +301,7 @@ ${JSON.stringify(diagnosticData, null, 2)}
300
301
  Identify the most likely root cause and give 3-5 concise actionable next steps.`,
301
302
  }],
302
303
  });
303
- const analysis = analysisMsg.content[0].text;
304
+ const analysis = anthropicResponseText(analysisMsg);
304
305
  return j({
305
306
  diagnostic_data: diagnosticData,
306
307
  analysis,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendinel/mcp-server",
3
- "version": "1.0.57",
3
+ "version": "1.0.58",
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",