feat: extend comprehensive monthly settlement snapshots (#18)

This commit is contained in:
gitea-impl-agent
2026-10-13 04:36:38 +00:00
parent f67c07adf0
commit dd35e0785f
30 changed files with 1817 additions and 48 deletions
+11
View File
@@ -484,3 +484,14 @@ def finalize_settlement_draft(draft_id: str, expected_version: int, review_finge
@mcp.tool()
def cancel_settlement_draft(draft_id: str, expected_version: int, cancelled_by: str, reason: str) -> dict:
return contracts.cancel_settlement_draft(draft_id, expected_version, cancelled_by, reason)
@mcp.tool()
def set_settlement_cashflow_policy(draft_id: str, expected_version: int, updated_by: str, cashflow_policy: dict) -> dict:
"""Set explicit monthly cashflow classification policy for a settlement draft."""
return contracts.set_settlement_cashflow_policy(draft_id, expected_version, updated_by, cashflow_policy)
@mcp.tool()
def get_monthly_settlement_snapshot(month: str = "", run_id: str = "") -> dict:
"""Read a saved monthly settlement snapshot, optionally selecting an exact run."""
return contracts.get_monthly_settlement_snapshot(month, run_id)
@@ -10,6 +10,8 @@ from ...service import (
refresh_settlement_draft_targets as refresh_settlement_draft_targets,
review_settlement_draft as review_settlement_draft,
set_settlement_draft_item as set_settlement_draft_item,
set_settlement_cashflow_policy as set_settlement_cashflow_policy,
get_monthly_settlement_snapshot as get_monthly_settlement_snapshot,
update_settlement_draft as update_settlement_draft,
annotations as annotations,
apply_categorization_rules as apply_categorization_rules,
@@ -91,6 +93,7 @@ TOOL_CONTRACTS = {
"update_settlement_draft", "refresh_settlement_draft_targets",
"set_settlement_draft_item", "review_settlement_draft",
"approve_settlement_draft", "finalize_settlement_draft", "cancel_settlement_draft",
"set_settlement_cashflow_policy", "get_monthly_settlement_snapshot",
)
}
@@ -99,6 +102,7 @@ __all__ = [
"finalize_settlement_draft", "get_settlement_draft", "list_settlement_drafts",
"refresh_settlement_draft_targets", "review_settlement_draft",
"set_settlement_draft_item", "update_settlement_draft",
"set_settlement_cashflow_policy", "get_monthly_settlement_snapshot",
"annotations",
"apply_categorization_rules",
"close_asset_snapshot",