Finfry::App
Wires the Jargon-defined CLI to the Store and renders output. Every entry
path (manual commands now, the AI layer later) funnels through commit and
render, so the ledger logic lives here rather than in the CLI handlers.
Constants
Finalize: every staged-cleared transaction is locked into the committed tier, but only if the cleared balance matches the statement — so you can't reconcile to a wrong number. Requires -s. Where --adjust books a small unexplained reconciliation residual — the classic "cash over and short" account. Big or explainable differences should be entered manually to their real accounts instead.
Constructors
Class methods
Instance methods
Known accounts, most recently used first; never-used ones last, alphabetically. Ordering only — every account is always offered.
Balances as a tree: each parent with the total of its subtree, children
indented under it, sorted by name. A parent with a single child and no
postings of its own collapses into that child (Food:Coffee), the way
ledger tools print charts, so depth only appears where it carries
information.
Display-signed balances, sorted by account name.
Validate, persist, and echo a transaction. The single commit path.
The queue as it stands, without catching up — for pages, which must not
write on a GET. Pair with newly_due to offer the catch-up.
The due queue, materializing anything newly due first (the CLI's semantics). Oldest first.
Run one dispatch subcommand (e.g. "spend", "due ok") with pre-parsed arguments, capturing its output instead of printing. Returns the output (or the error message) and whether it errored. The web UI's write path.
Execute one agent tool directly (no plan deferral) and return its captured
output plus whether it errored. Used by the MCP server, where the client
harness owns approval. Both reads and writes execute immediately; each
write records its own undoable changeset via commit.
The general ledger: every account with postings (exact, not subtree — each account is its own page), in name order, each with the balance brought forward into the period, its lines in the period, and the running balance. Accounts with nothing in the period and a zero balance are left out.
Newest first. all includes bookkeeping commits and undo marks.
Human label for a recurring rule / due entry (memo, or the accounts, plus amount).
A sensible next statement date: a month after the last one, else today.
The most recent transaction recorded under this memo (case-insensitive; exact match first, then prefix), so a repeat entry can start from it.
Every account that has statements to reconcile against (assets and liabilities in use), with where its reconciliation stands.
Reconciliation status: the working list (every not-yet-reconciled transaction with a posting on the account, staged ones flagged), the cleared balance (committed + staged), the full ledger balance, and — with a statement — the difference to it.
The funding account you used last (the credit leg of the most recent transaction that has an asset/liability one), else the default.