Optional features

Every optional feature can be switched off, in two layers (packages/shared/src/features.ts):

Dependencies apply automatically: prep, chat and follow-up drafts need AI, and portal sync needs the extension. AI also needs an API key the user may use (BYOK). Everything goes through one helper, featureState/isEnabled:

API tokens exist only for the extension. With the extension off, token requests are refused, except self-revoke, so Disconnect still works.