troxy-cli 1.26.0 → 1.27.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "troxy-cli",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "description": "A secure control layer for AI agents: policies across payments, messages, logins, destructive actions, model usage, and secrets, all enforceable from the CLI",
5
5
  "homepage": "https://troxy.io",
6
6
  "bugs": {
package/src/mcp-server.js CHANGED
@@ -578,7 +578,8 @@ export async function runMcp() {
578
578
  if (result.error) {
579
579
  return { content: [{ type: 'text', text: `Troxy error: ${result.error}` }], isError: true };
580
580
  }
581
- const { decision, reason, audit_id, approval_token, suggested_model, suggestion_reason } = result;
581
+ const { decision, reason, audit_id, approval_token, suggested_model, suggestion_reason,
582
+ suggested_effort, effort_suggestion_reason } = result;
582
583
  const what = `${args.model}${args.effort ? ` at ${args.effort} effort` : ''}`;
583
584
  // Every non-blocked branch repeats the audit_id and the instruction to
584
585
  // report back. Half the value of this checkpoint is the second call, and
@@ -590,11 +591,16 @@ export async function runMcp() {
590
591
  const suggestionText = suggested_model
591
592
  ? ` Suggestion: ${suggestion_reason || `${suggested_model} would likely work just as well here.`} If you'd like to use it, call evaluate_model again with model="${suggested_model}" — no obligation, this run is already approved as-is.`
592
593
  : '';
594
+ // Same pattern, same dark-ship gate, sibling advisory - independent of
595
+ // suggested_model so a call can carry either, both, or neither.
596
+ const effortSuggestionText = suggested_effort
597
+ ? ` Suggestion: ${effort_suggestion_reason || `${suggested_effort} effort would likely work just as well here.`} If you'd like to use it, call evaluate_model again with effort="${suggested_effort}" — no obligation, this run is already approved as-is.`
598
+ : '';
593
599
  let modelText;
594
600
  switch (decision) {
595
601
  case 'ALLOW':
596
602
  case 'NOTIFY':
597
- modelText = `✓ Approved: ${what}.${reason ? ` ${reason}` : ''} You may run it.${followUp}${suggestionText} (audit: ${audit_id})`;
603
+ modelText = `✓ Approved: ${what}.${reason ? ` ${reason}` : ''} You may run it.${followUp}${suggestionText}${effortSuggestionText} (audit: ${audit_id})`;
598
604
  break;
599
605
  case 'BLOCK':
600
606
  modelText = `✗ Blocked: ${what}.${reason ? ` ${reason}` : ''} Do not use this model for this task. Choose a cheaper or smaller model and call evaluate_model again with the new model id. (audit: ${audit_id})`;