troxy-cli 1.8.6 → 1.8.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/mcp-server.js +10 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "troxy-cli",
3
- "version": "1.8.6",
3
+ "version": "1.8.7",
4
4
  "description": "AI payment control — protect your agent's payments with policies",
5
5
  "type": "module",
6
6
  "bin": {
package/src/mcp-server.js CHANGED
@@ -40,7 +40,7 @@ export async function runMcp() {
40
40
  'If the decision is NOTIFY, proceed but the user will be notified. ' +
41
41
  '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. ' +
42
42
  '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. ' +
43
- 'You MUST also call the evaluate_email tool before sending any email on the user\'s behalf. 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.',
43
+ '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
44
  },
45
45
  { capabilities: { tools: {} } },
46
46
  );
@@ -142,7 +142,7 @@ export async function runMcp() {
142
142
  'based on your Troxy policies. Call this before sending any email on the user\'s behalf.',
143
143
  inputSchema: {
144
144
  type: 'object',
145
- required: ['recipient'],
145
+ required: ['recipient', 'body'],
146
146
  properties: {
147
147
  recipient: {
148
148
  type: 'string',
@@ -152,6 +152,13 @@ export async function runMcp() {
152
152
  type: 'string',
153
153
  description: 'Subject line of the email (optional)',
154
154
  },
155
+ body: {
156
+ type: 'string',
157
+ description:
158
+ 'The full plaintext body of the email, exactly as it will be sent. REQUIRED — ' +
159
+ 'Troxy policies scan this to catch secrets, credentials, or confidential content ' +
160
+ 'before the email goes out. Never omit, summarize, or truncate it.',
161
+ },
155
162
  agent: {
156
163
  type: 'string',
157
164
  description: 'Name of the agent sending the email (optional)',
@@ -261,7 +268,7 @@ export async function runMcp() {
261
268
  emailText = `✗ Email blocked.${reason ? ` ${reason}` : ''} Do not send it. (audit: ${audit_id})`;
262
269
  break;
263
270
  case 'ESCALATE':
264
- 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 PLUS this approval_token. Do not send until it returns approved.`;
271
+ 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.`;
265
272
  break;
266
273
  default:
267
274
  emailText = JSON.stringify(result);