An account can now resolve to the default token saved in Settings
(TokenSource = Default) instead of holding a copy of its own, so replacing the
default token rotates every such account at once. Own stays the on-disk
default and is omitted from accounts.json, so existing files and vault entries
are untouched.
AccountTokenResolver is the one place that turns an account into its token;
the desktop workspace, Sync All and the CLI go through it. AccountsStore saves
a Default account without a vault entry and removes an own entry when an
account switches, vault first with the same put-it-back compensation as a
delete; CountUsingDefaultToken feeds the Settings captions in step 3.
CLI parity: `accounts add` and `accounts edit` take --use-default-token (a
fatal error when no default token is saved; exclusive with the other token
options), `accounts list` shows the source as a column and as tokenSource in
JSON, and `sync --account` names the source and the fix when no token
resolves. Threat model T5 and docs/CLI.md updated; the approved plan is in
docs/plans/default-token-ux.md.
Closes#104
Part of #102
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
Design for #101 (Settings shows a saved default token as a masked value) and #102 (Add account uses the default token by reference, so rotating it in Settings rotates every such account): TokenSource on the account record, one resolver for app and CLI, wizard step 2 as a choice, guarded removal in Settings, CLI parity, tests and delivery order.
Relates to #101, #102
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>