feat: implement asset snapshot and manual asset read model

This commit is contained in:
Jarca
2026-06-30 22:04:52 +09:00
parent 7fd1b45bd5
commit beddff7661
20 changed files with 1232 additions and 61 deletions
+16 -1
View File
@@ -51,9 +51,24 @@ def update_ledger_account(account_id: str, name: str | None = None, type: str |
@mcp.tool()
def get_asset_liquidity_report() -> dict:
"""Return asset liquidity, debt, and net worth from account liquidity buckets and last_balance."""
"""Return asset liquidity, debt, and net worth from shared account/manual valuation sources."""
return service.get_asset_liquidity_report()
@mcp.tool()
def list_manual_assets(active_only: bool = True) -> dict:
"""List manual non-transaction assets/liabilities used for net-worth valuation."""
return service.list_manual_assets(active_only=active_only)
@mcp.tool()
def get_asset_snapshot_report(basis_date: str = "") -> dict:
"""Return basis-date asset snapshot/net-worth report with live-authority fallback."""
return service.get_asset_snapshot_report(basis_date=basis_date)
@mcp.tool()
def get_net_worth_timeseries(start_date: str = "", end_date: str = "", months: int = 12) -> dict:
"""Return net-worth timeseries from stored asset snapshot rows."""
return service.get_net_worth_timeseries(start_date=start_date, end_date=end_date, months=months)
@mcp.tool()
def get_balance_reconciliation_report(account_id: str = "", baseline_balance: int | None = None, baseline_at: str = "", source_note: str = "", memo: str = "", tolerance: int = 1000) -> dict:
"""Preview balance reconciliation for manual_only/partial_import accounts without mutating the DB."""