@sendinel/mcp-server 1.0.27 → 1.0.29
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.
|
@@ -155,6 +155,10 @@ export function buildApprovalSummary(action, params) {
|
|
|
155
155
|
const fn = summaries[action];
|
|
156
156
|
return fn ? fn(params) : `Execute ${action} with provided parameters`;
|
|
157
157
|
}
|
|
158
|
+
function approvalPageUrl(approvalId) {
|
|
159
|
+
const base = (process.env.NEXT_PUBLIC_APP_URL ?? process.env.SENDINEL_APP_URL ?? process.env.APP_URL ?? 'https://sendinel.ai').replace(/\/$/, '');
|
|
160
|
+
return `${base}/dashboard/approvals/${approvalId}`;
|
|
161
|
+
}
|
|
158
162
|
function normalizeApprovalParams(value) {
|
|
159
163
|
if (Array.isArray(value)) {
|
|
160
164
|
return value.map(normalizeApprovalParams);
|
|
@@ -209,7 +213,8 @@ export async function requestApproval(action, params, apiKeyId, channelContext)
|
|
|
209
213
|
action,
|
|
210
214
|
summary,
|
|
211
215
|
expires_at: expiresAt,
|
|
212
|
-
approve_via: 'Dashboard → Pending Approvals, or Slack /sendinel approve',
|
|
216
|
+
approve_via: 'Open approve_url (works on a phone), Dashboard → Pending Approvals, or Slack /sendinel approve',
|
|
217
|
+
approve_url: approvalPageUrl(data.id),
|
|
213
218
|
message: `This action requires human approval. A notification has been sent to your dashboard. Approval ID: ${data.id}. Check status with: poll this approval_id, or wait for the webhook callback (event: approval.decided). Token expires in 30 minutes.`,
|
|
214
219
|
};
|
|
215
220
|
}
|
package/build/tools/connector.js
CHANGED
|
@@ -243,21 +243,24 @@ export function registerConnectorTools(server) {
|
|
|
243
243
|
}),
|
|
244
244
|
metadata_columns: z.array(z.string()).max(100).optional()
|
|
245
245
|
.describe('Extra source columns copied into contact custom_properties.'),
|
|
246
|
+
identity_merge: z.enum(['off', 'by_email']).optional()
|
|
247
|
+
.describe('How the contact view treats a person found both in the source table and as a Sendinel-owned contact: off = two rows (default), by_email = one row per email (source wins the name, tags combined, unsubscribe and test flags kept from either side). Omit to leave it unchanged.'),
|
|
246
248
|
...approvalFields,
|
|
247
249
|
},
|
|
248
|
-
}, async ({ table_id, mapping, metadata_columns, confirmed, approval_id }) => {
|
|
249
|
-
const approvalParams = { table_id, mapping, metadata_columns };
|
|
250
|
+
}, async ({ table_id, mapping, metadata_columns, identity_merge, confirmed, approval_id }) => {
|
|
251
|
+
const approvalParams = { table_id, mapping, metadata_columns, ...(identity_merge ? { identity_merge } : {}) };
|
|
250
252
|
const gate = await authorizeConnectorMutation('set_connector_mapping', confirmed, approval_id, approvalParams, {
|
|
251
253
|
effect: 'Replace the connector mapping, clear removed custom properties, refresh the live view, and resync contacts.',
|
|
252
254
|
table_id,
|
|
253
255
|
mapping,
|
|
254
256
|
metadata_columns: metadata_columns ?? [],
|
|
257
|
+
...(identity_merge ? { identity_merge } : {}),
|
|
255
258
|
});
|
|
256
259
|
if (gate)
|
|
257
260
|
return gate;
|
|
258
261
|
const result = await callConnectorApi('/api/dashboard/connector/mapping', {
|
|
259
262
|
method: 'PATCH',
|
|
260
|
-
body: { table_id, mapping, metadata_columns },
|
|
263
|
+
body: { table_id, mapping, metadata_columns, ...(identity_merge ? { identity_merge } : {}) },
|
|
261
264
|
});
|
|
262
265
|
return j(result.ok ? result.data : { error: result.error });
|
|
263
266
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendinel/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
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",
|
|
@@ -23,26 +23,26 @@
|
|
|
23
23
|
"prepublishOnly": "npm run build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@anthropic-ai/sdk": "^0.
|
|
26
|
+
"@anthropic-ai/sdk": "^0.131.0",
|
|
27
27
|
"@desler/models": "file:../models",
|
|
28
28
|
"@sendinel/domain": "file:../domain",
|
|
29
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
29
|
+
"@modelcontextprotocol/sdk": "^1.32.0",
|
|
30
30
|
"@supabase/supabase-js": "^2.98.0",
|
|
31
31
|
"dotenv": "^16.4.7",
|
|
32
32
|
"express": "^5.2.1",
|
|
33
|
-
"fast-xml-parser": "^5.
|
|
34
|
-
"file-type": "^22.
|
|
35
|
-
"jose": "^6.2.
|
|
33
|
+
"fast-xml-parser": "^5.11.2",
|
|
34
|
+
"file-type": "^22.1.1",
|
|
35
|
+
"jose": "^6.2.12",
|
|
36
36
|
"qrcode": "^1.5.4",
|
|
37
|
-
"resend": "^6.
|
|
37
|
+
"resend": "^6.32.0",
|
|
38
38
|
"undici": "^8.10.0",
|
|
39
39
|
"zod": "^4.4.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/express": "^5.0.3",
|
|
43
|
-
"@types/node": "^26.
|
|
43
|
+
"@types/node": "^26.6.4",
|
|
44
44
|
"@types/qrcode": "^1.5.6",
|
|
45
|
-
"tsx": "^4.23.
|
|
45
|
+
"tsx": "^4.23.15",
|
|
46
46
|
"typescript": "^7.0.2",
|
|
47
47
|
"vitest": "^4.1.10"
|
|
48
48
|
},
|