/api/mcp (Streamable HTTP, stateless) with personal tokens made on Connect
your AI (stored as a hash, shown once, revocable; migration 0033). Each call
runs as the token's user in their own session, so RLS applies; AI switched
off in Settings refuses.
Summary only, like every cloud path: the existing summary tools, plus tools
that change things through placeholders and answer with counts: list
categories and rules, create rule, delete rule (with undo), recategorize,
find transfers, merge accounts (preview first).
Rule past-matching and merging moved to shared libraries (lib/rule-past.ts,
lib/merge-run.ts) so the app and the tools run the same code.
Tested with the official MCP client: bad token refused, tools listed, and the
'ing' rule found, undone and replaced.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- save when the permission ends (consent_until, migration 0032)
- Accounts warns two weeks ahead, says Needs attention once it ran out, and offers
Link again; an expired or revoked session no longer shows a raw API error
- accounts and rows are keyed on identification_hash, which stays the same across
links (the uid doesn't), so linking again adds no copies and keeps edits
- links made with the per-link uid move to the stable key on their next sync
- linking the same bank again replaces the old connection
Tested against the stand-in: first link, moving old IDs, linking again,
the warning and an expired permission.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An Edit button on every account: name, and what kind it is (bank account,
credit card, loan, investment, something else). The kind decides where it
counts: a credit card's balance is money you owe.
- The kind you pick sticks: migration 0031 adds accounts.type_override, and a
trigger puts it back whenever a sync writes the bank's type, so every page
keeps reading accounts.type.
- An imported or hand-added credit card or loan now adds its purchases to what
you owe (it subtracted them, as for a bank account).
- Delete for accounts you added or imported, with their transactions. A linked
account says to hide it or remove the bank, since sync would bring it back.
Tested on a local Supabase: rename + Credit card moved the imported account
under Credit cards; a sync-style write of type depository kept it credit;
deleting removed it and its 358 transactions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>