fullcourtdefense-cli 1.21.22 → 1.21.24

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.
@@ -876,8 +876,19 @@ class McpGatewayServer {
876
876
  }
877
877
  }
878
878
  else {
879
- const reason = preflight.actionPolicy?.reason || preflight.intentEvaluation?.reasons?.[0] || `Tool call ${preflight.decision}.`;
880
- throw new Error(reason);
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);
@@ -180,8 +180,13 @@ function checkMcpGateways() {
180
180
  function checkTerminalGuards() {
181
181
  const checks = [];
182
182
  if (process.platform === 'win32') {
183
- checks.push({ label: 'PowerShell shell guard', ok: (0, shellGuard_1.isShellGuardInstalled)(), detail: (0, shellGuard_1.isShellGuardInstalled)() ? undefined : 'run install-shell-guard' });
184
- checks.push({ label: 'cmd.exe shell guard', ok: (0, cmdGuard_1.isCmdGuardInstalled)(), detail: (0, cmdGuard_1.isCmdGuardInstalled)() ? undefined : 'run install-cmd-guard' });
183
+ // Warnings, not failures: managed/bank machines commonly block PowerShell
184
+ // profile and AutoRun registry writes (EDR persistence rules, redirected
185
+ // Documents folders). Hooks + MCP gateways + daemon still protect the
186
+ // machine; failing onboarding here makes the MSI roll back a protected
187
+ // install (seen on the first customer deployment).
188
+ checks.push({ label: 'PowerShell shell guard', ok: (0, shellGuard_1.isShellGuardInstalled)(), optional: true, detail: (0, shellGuard_1.isShellGuardInstalled)() ? undefined : 'run install-shell-guard' });
189
+ checks.push({ label: 'cmd.exe shell guard', ok: (0, cmdGuard_1.isCmdGuardInstalled)(), optional: true, detail: (0, cmdGuard_1.isCmdGuardInstalled)() ? undefined : 'run install-cmd-guard' });
185
190
  const audit = (0, windowsAudit_1.getWindowsAuditStatus)();
186
191
  const auditOk = audit.scriptBlockLogging && audit.transcription;
187
192
  checks.push({
@@ -415,8 +420,16 @@ async function onboardCommand(args, config) {
415
420
  checkMcpGateways(),
416
421
  ...checkTerminalGuards(),
417
422
  {
423
+ // Warning, not a failure: on hardened/managed machines (bank laptops,
424
+ // EDR blocking HKCU Run-key writes, standard users denied schtasks)
425
+ // autostart registration can be denied even though hooks, enrollment,
426
+ // and the in-session daemon are all healthy. Failing onboarding here
427
+ // makes the MSI roll back a genuinely protected install — instead we
428
+ // finish, and the fleet console nudges "run daemon --install" until
429
+ // the daemon reports (real gap seen on the first customer install).
418
430
  label: 'Resident daemon autostart',
419
431
  ok: (0, daemon_1.isDaemonAutostartInstalled)(),
432
+ optional: true,
420
433
  detail: (0, daemon_1.isDaemonAutostartInstalled)() ? undefined : 'run fullcourtdefense daemon --install true from an elevated terminal',
421
434
  },
422
435
  {
package/dist/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "1.21.22"
2
+ "version": "1.21.24"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fullcourtdefense-cli",
3
- "version": "1.21.22",
3
+ "version": "1.21.24",
4
4
  "description": "Full Court Defense CLI — security scanning for AI agents from your terminal",
5
5
  "main": "dist/index.js",
6
6
  "bin": {