SECURITY & GOVERNANCE

Fail-Closed in Key Scenarios

Automation tools with system privileges must enforce explicit execution boundaries. In key scenarios, Mercury fails closed by default: when identity is missing, permissions are absent, or previous action outcome is unknown.

Governance Invariants

  • Strict File Permissions (0600) Registry and per-client token files require strict owner-only permissions (0600). The daemon checks the client registry file on every request and reloads it when it changes. If the registry cannot be loaded (for example, its permissions are too broad), the daemon keeps the last good snapshot, does not widen access, and prints a redacted error to its error output (the app does not save that output).
  • Owner-Gated Capability Scopes Clients are bound to capability profiles (owner-full, scoped, read-only). Read-only clients are refused write, run and AppleScript capabilities.
  • UNCERTAIN Recovery & No Blind Retries If the outcome of an action is unknown, Mercury reports UNCERTAIN status and rejects blind retries, preventing duplicate side effects.
  • No Fake Success Unsupported or unauthorized capabilities return an explicit error result rather than a simulated success.
// Mercury MCP Client Registration (0600 token isolation) // products/mercury-device-commander/docs/client-identity-and-resource-lease.md $ node src/client-admin.js create claude-code --profile owner-full token: runtime/clients/claude-code.token (chmod 0600) $ node src/client-admin.js create auditor --profile read-only token: runtime/clients/auditor.token (read-only enforcement) // MCP Configuration (tested with Claude; a sample configuration is available for Gemini) { "mcpServers": { "mercury": { "command": "/Applications/Mercury Device Commander.app/Contents/MacOS/Mercury Device Commander", "args": ["mcp", "--client", "claude-code"] } } }