troxy-cli 1.8.9 → 1.9.0
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/package.json +1 -1
- package/src/mcp-server.js +12 -3
package/package.json
CHANGED
package/src/mcp-server.js
CHANGED
|
@@ -41,7 +41,7 @@ export async function runMcp() {
|
|
|
41
41
|
'If the decision is NOTIFY, proceed but the user will be notified. ' +
|
|
42
42
|
'When calling evaluate_payment, use the merchant\'s domain name as merchant_name when available (e.g. "amazon.com", "indigobloom.co.il"); this ensures consistent matching against policies. ' +
|
|
43
43
|
'After every ALLOW or NOTIFY decision, attempt the payment, then call confirm_payment with the audit_id and the outcome (success/failed/cancelled). Always include a reason when the charge fails. ' +
|
|
44
|
-
'You MUST also call the evaluate_email tool before sending any email on the user\'s behalf. Always include the full plaintext "body" argument, exactly as you intend to send it — Troxy policies inspect the body for secrets and confidential content, and cannot do so if it is omitted, summarized, or truncated. Never send an email without first receiving an ALLOW or NOTIFY decision. If BLOCK, do not send it. If ESCALATE, call wait_for_payment_approval with the returned approval_token (same wait mechanism payments use), then call evaluate_email again with the approval_token once approved. ' +
|
|
44
|
+
'You MUST also call the evaluate_email tool before sending any email on the user\'s behalf. Always include the full plaintext "body" argument, exactly as you intend to send it — Troxy policies inspect the body for secrets and confidential content, and cannot do so if it is omitted, summarized, or truncated. When the email goes to more than one person (a reply-all, a group, a bulk send), also pass every To/Cc/Bcc address in "recipients" so mass-email policies can apply. Never send an email without first receiving an ALLOW or NOTIFY decision. If BLOCK, do not send it. If ESCALATE, call wait_for_payment_approval with the returned approval_token (same wait mechanism payments use), then call evaluate_email again with the approval_token once approved. ' +
|
|
45
45
|
'You MUST also call the evaluate_login tool before logging into or signing up for any website on the user\'s behalf, giving the site\'s domain and whether it is a login or a signup. Never submit login credentials or a signup form without first receiving an ALLOW or NOTIFY decision. If BLOCK, do not proceed. If ESCALATE, call wait_for_payment_approval with the returned approval_token, then call evaluate_login again with the approval_token once approved.',
|
|
46
46
|
},
|
|
47
47
|
{ capabilities: { tools: {} } },
|
|
@@ -148,7 +148,16 @@ export async function runMcp() {
|
|
|
148
148
|
properties: {
|
|
149
149
|
recipient: {
|
|
150
150
|
type: 'string',
|
|
151
|
-
description: 'Email address of the recipient',
|
|
151
|
+
description: 'Email address of the primary recipient',
|
|
152
|
+
},
|
|
153
|
+
recipients: {
|
|
154
|
+
type: 'array',
|
|
155
|
+
items: { type: 'string' },
|
|
156
|
+
description:
|
|
157
|
+
'EVERY address the email will reach — all To, Cc, and Bcc recipients, ' +
|
|
158
|
+
'including the primary one. Send this whenever there is more than one ' +
|
|
159
|
+
'recipient (a reply-all, a group, a bulk send), so Troxy policies about ' +
|
|
160
|
+
'mass email can apply. Omit only for a genuine one-to-one email.',
|
|
152
161
|
},
|
|
153
162
|
subject: {
|
|
154
163
|
type: 'string',
|
|
@@ -299,7 +308,7 @@ export async function runMcp() {
|
|
|
299
308
|
emailText = `✗ Email blocked.${reason ? ` ${reason}` : ''} Do not send it. (audit: ${audit_id})`;
|
|
300
309
|
break;
|
|
301
310
|
case 'ESCALATE':
|
|
302
|
-
emailText = `⏳ Email requires human approval; a request has been sent to the account owner.\n\nApproval token: ${approval_token}\n\nNow call wait_for_payment_approval(approval_token="${approval_token}") to automatically detect approval, then call evaluate_email again with the same recipient/subject/body PLUS this approval_token. Do not send until it returns approved.`;
|
|
311
|
+
emailText = `⏳ Email requires human approval; a request has been sent to the account owner.\n\nApproval token: ${approval_token}\n\nNow call wait_for_payment_approval(approval_token="${approval_token}") to automatically detect approval, then call evaluate_email again with the same recipient/recipients/subject/body PLUS this approval_token. Do not send until it returns approved.`;
|
|
303
312
|
break;
|
|
304
313
|
default:
|
|
305
314
|
emailText = JSON.stringify(result);
|