fullcourtdefense-cli 1.21.22 → 1.21.23
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/dist/commands/mcpGateway.js +13 -2
- package/dist/version.json +1 -1
- package/package.json +1 -1
|
@@ -876,8 +876,19 @@ class McpGatewayServer {
|
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
878
|
else {
|
|
879
|
-
|
|
880
|
-
|
|
879
|
+
// Detailed, self-explanatory block message: WHICH policy fired, WHAT rule matched,
|
|
880
|
+
// and where to review it — so the developer (and the AI agent relaying the error)
|
|
881
|
+
// can tell exactly why the call was refused instead of guessing.
|
|
882
|
+
const policy = preflight.actionPolicy;
|
|
883
|
+
const parts = [];
|
|
884
|
+
parts.push(policy?.reason || preflight.intentEvaluation?.reasons?.[0] || `Tool call ${preflight.decision} by FullCourtDefense.`);
|
|
885
|
+
if (policy?.policyName)
|
|
886
|
+
parts.push(`Policy: "${policy.policyName}"`);
|
|
887
|
+
if (policy?.matchedRule)
|
|
888
|
+
parts.push(`Matched rule: ${policy.matchedRule}`);
|
|
889
|
+
parts.push(`Tool: ${toolName}${operation && operation !== toolName ? ` (operation: ${operation})` : ''}`);
|
|
890
|
+
parts.push(`Review or change this policy in the FullCourtDefense console → Agent Security → Policies.`);
|
|
891
|
+
throw new Error(parts.join(' | '));
|
|
881
892
|
}
|
|
882
893
|
}
|
|
883
894
|
const rawResult = await this.downstream.callTool(toolName, toolArgs);
|
package/dist/version.json
CHANGED