@sendinel/mcp-server 1.0.89 → 1.0.90

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,4 +1,4 @@
1
- export { FALLBACK_MODEL_IDS, HAIKU_4_5_MODEL_ID, MODEL_REGISTRY, ROLE, getAnthropicFastModelId, getAnthropicHaiku45ModelId, getAnthropicFrontierModelId, getAnthropicModelId, getAnthropicReasoningModelId, getModelIdForRole, resolveModel, type ModelMetadata, type ModelRole, type ResolvedModel, } from '@desler/models';
1
+ export { FALLBACK_MODEL_IDS, HAIKU_4_5_MODEL_ID, MODEL_REGISTRY, ROLE, getAnthropicFastModelId, getAnthropicHaiku45ModelId, getAnthropicFrontierModelId, getAnthropicModelId, getAnthropicReasoningModelId, getModelIdForRole, resolveModel, parseModelJson, type ModelMetadata, type ModelRole, type ResolvedModel, } from '@desler/models';
2
2
  import { type ModelRole, type ResolvedModel } from '@desler/models';
3
3
  export declare const DEFAULT_ANTHROPIC_MODEL_ID: string;
4
4
  export declare const DEFAULT_ANTHROPIC_FAST_MODEL_ID: string;
@@ -1,4 +1,4 @@
1
- export { FALLBACK_MODEL_IDS, HAIKU_4_5_MODEL_ID, MODEL_REGISTRY, ROLE, getAnthropicFastModelId, getAnthropicHaiku45ModelId, getAnthropicFrontierModelId, getAnthropicModelId, getAnthropicReasoningModelId, getModelIdForRole, resolveModel, } from '@desler/models';
1
+ export { FALLBACK_MODEL_IDS, HAIKU_4_5_MODEL_ID, MODEL_REGISTRY, ROLE, getAnthropicFastModelId, getAnthropicHaiku45ModelId, getAnthropicFrontierModelId, getAnthropicModelId, getAnthropicReasoningModelId, getModelIdForRole, resolveModel, parseModelJson, } from '@desler/models';
2
2
  import { MODEL_REGISTRY, resolveModel } from '@desler/models';
3
3
  import { adminDb } from './db.js';
4
4
  export const DEFAULT_ANTHROPIC_MODEL_ID = MODEL_REGISTRY.default.id;
@@ -4,7 +4,7 @@ import Anthropic from '@anthropic-ai/sdk';
4
4
  import { adminDb, db } from '../db.js';
5
5
  import { getProjectId } from '../project.js';
6
6
  import { buildVoicePrompt, deriveTemplateVariables } from '../lib/voice.js';
7
- import { getAnthropicFastModelId } from '../anthropic-model.js';
7
+ import { parseModelJson, getAnthropicFastModelId } from '../anthropic-model.js';
8
8
  import { BLOCK_GENERATION_SCHEMA, blocksToHtml, blocksToText, normalizeComposerBlocks } from '../lib/composer-blocks.js';
9
9
  // Haiku 5.5 (fast role) thinks before answering; thinking counts toward max_tokens (#4193).
10
10
  const FAST_MIN_MAX_TOKENS = 8000;
@@ -34,16 +34,10 @@ function getAnthropicClient() {
34
34
  return new Anthropic({ apiKey });
35
35
  }
36
36
  function extractJsonArray(raw) {
37
- const match = raw.match(/\[[\s\S]*\]/);
38
- if (!match)
39
- throw new Error('No JSON array in response');
40
- return JSON.parse(match[0]);
37
+ return parseModelJson(raw, { kind: 'array' });
41
38
  }
42
39
  function extractJsonObject(raw) {
43
- const match = raw.match(/\{[\s\S]*\}/);
44
- if (!match)
45
- throw new Error('No JSON object in response');
46
- return JSON.parse(match[0]);
40
+ return parseModelJson(raw, { kind: 'object' });
47
41
  }
48
42
  export function registerCompoundTools(server) {
49
43
  server.registerTool('setup_campaign_from_brief', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendinel/mcp-server",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
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",