@sendinel/mcp-server 1.0.191 → 1.0.192
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.
package/README.md
CHANGED
|
@@ -59,7 +59,9 @@ Sendinel currently exposes 35 tool groups and 349 tools (gateway mode exposes 4
|
|
|
59
59
|
| `webhooks` | 5 | Webhook subscription management |
|
|
60
60
|
|
|
61
61
|
`cancel_approval({approval_id})` rejects an unexpired, unused pending/approved
|
|
62
|
-
request in the current project for any write-scoped credential.
|
|
62
|
+
request in the current project for any write-scoped credential. It returns
|
|
63
|
+
`status: "rejected"` (kept for compatibility) plus `outcome: "cancelled"` and
|
|
64
|
+
`cancelled: true`.
|
|
63
65
|
`approve_approval({approval_id})` requires the person's own live OAuth connection
|
|
64
66
|
(`connection_role: NULL`) and its own pending request in that project. Tester,
|
|
65
67
|
agent, API key, service-token and scoped-JWT credentials cannot approve. Sends
|
|
@@ -100,6 +100,8 @@ export declare function checkApproval(approvalId: string, options?: {
|
|
|
100
100
|
}): Promise<Omit<Awaited<ReturnType<typeof checkApprovalState>>, 'decision_channel'> & {
|
|
101
101
|
decision_channel?: string;
|
|
102
102
|
decision_evidence?: DecisionEvidence;
|
|
103
|
+
outcome?: 'cancelled';
|
|
104
|
+
cancelled?: true;
|
|
103
105
|
}>;
|
|
104
106
|
declare function checkApprovalState(approvalId: string, options?: {
|
|
105
107
|
consume?: boolean;
|
|
@@ -469,7 +469,7 @@ export async function checkApproval(approvalId, options = {}) {
|
|
|
469
469
|
.eq('action', 'approval.cancelled').limit(1);
|
|
470
470
|
const cancel = data?.[0];
|
|
471
471
|
if (!error && cancel?.actor_id && typeof cancel.details?.channel === 'string') {
|
|
472
|
-
return { ...result, decided_by: cancel.actor_id, decision_channel: cancel.details.channel };
|
|
472
|
+
return { ...result, decided_by: cancel.actor_id, decision_channel: cancel.details.channel, outcome: 'cancelled', cancelled: true };
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
catch { /* A failed audit read cannot grant authority or change the status. */ }
|
|
@@ -4,6 +4,8 @@ export declare function cancelApproval(approvalId: string, transportClientName?:
|
|
|
4
4
|
} | {
|
|
5
5
|
approval_id: string;
|
|
6
6
|
status: 'rejected';
|
|
7
|
+
outcome: 'cancelled';
|
|
8
|
+
cancelled: true;
|
|
7
9
|
}>;
|
|
8
10
|
export declare function approveApproval(approvalId: string, transportClientName?: string): Promise<{
|
|
9
11
|
code: string;
|
|
@@ -53,12 +53,12 @@ export async function cancelApproval(approvalId, transportClientName) {
|
|
|
53
53
|
project_id: projectId, actor_type: actor.actorType ?? actor.authKind ?? 'api_key',
|
|
54
54
|
actor_id: actor.actorId ?? actor.keyId ?? actor.oauthTokenId ?? null,
|
|
55
55
|
action: 'approval.cancelled', resource_type: 'approval', resource_id: approvalId,
|
|
56
|
-
details: { status: 'rejected', channel, client_name: name, auth_kind: actor.authKind ?? null,
|
|
56
|
+
details: { status: 'rejected', outcome: 'cancelled', channel, client_name: name, auth_kind: actor.authKind ?? null,
|
|
57
57
|
oauth_token_id: actor.oauthTokenId ?? null, api_key_id: actor.keyId ?? null },
|
|
58
58
|
});
|
|
59
59
|
if (auditError)
|
|
60
60
|
return refuse('approval_audit_failed', 'Approval cancelled, but audit failed. Check its status before retrying.');
|
|
61
|
-
return { approval_id: approvalId, status: 'rejected' };
|
|
61
|
+
return { approval_id: approvalId, status: 'rejected', outcome: 'cancelled', cancelled: true };
|
|
62
62
|
}
|
|
63
63
|
catch {
|
|
64
64
|
return refuse('approval_failed', 'Cancellation failed. Check approval status before retrying.');
|
package/build/tools/approvals.js
CHANGED
|
@@ -23,7 +23,7 @@ export function registerApprovalTools(server, options) {
|
|
|
23
23
|
});
|
|
24
24
|
server.registerTool('cancel_approval', {
|
|
25
25
|
title: 'Cancel Approval',
|
|
26
|
-
description: 'Cancel an unexpired, unused pending or approved action approval in this project. Read-scoped OAuth connections can cancel only their own token’s requests; write/admin credentials can cancel any eligible request in this project.
|
|
26
|
+
description: 'Cancel an unexpired, unused pending or approved action approval in this project. Read-scoped OAuth connections can cancel only their own token’s requests; write/admin credentials can cancel any eligible request in this project. Marks it cancelled (stored and reported as status `rejected` for backward compatibility; `outcome: "cancelled"` and `cancelled: true` distinguish a withdrawal from a person’s rejection) and records who cancelled and the request channel in the audit; check_approval returns that cancellation attribution. Cannot approve or undo cancellation.',
|
|
27
27
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
28
28
|
inputSchema: { approval_id: z.string().uuid() },
|
|
29
29
|
}, async ({ approval_id }) => {
|
|
@@ -59,7 +59,7 @@ export function registerApprovalTools(server, options) {
|
|
|
59
59
|
idempotentHint: true,
|
|
60
60
|
openWorldHint: false,
|
|
61
61
|
},
|
|
62
|
-
description: 'Check the status of a pending action approval. Use this to poll after requesting an action that requires human approval. Returns approved/pending/rejected/expired
|
|
62
|
+
description: 'Check the status of a pending action approval. Use this to poll after requesting an action that requires human approval. Returns approved/pending/rejected/expired; a cancelled approval keeps status `rejected` and adds `outcome: "cancelled"` and `cancelled: true`.',
|
|
63
63
|
inputSchema: {
|
|
64
64
|
approval_id: z.string().uuid().describe('The approval ID returned by the original tool call'),
|
|
65
65
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendinel/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.192",
|
|
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",
|