2.3 KiB
2.3 KiB
BAT-014 Implementation
Plan summary
BAT-014 implements dcy-011 Phase 7 by narrowing the remaining adapter surfaces without changing public MCP tool names or dashboard behavior. The MCP server now depends on adapters/mcp/tool_contracts.py instead of a broad direct service import, and the Streamlit dashboard now calls page/domain gateways under adapters/streamlit/*_gateway.py rather than a flat broad service_gateway namespace. service_gateway.py remains as a compatibility aggregator.
Delivered changes
- Added
jarca_ledger_mcp/adapters/mcp/tool_contracts.pyas the MCP adapter contract surface and repointedadapters/mcp/server.pywrappers tocontracts.*callables. - Added page/domain Streamlit gateways:
overview_gateway.pyassets_gateway.pytransactions_gateway.pycategorization_gateway.pytransfers_gateway.pyimports_gateway.pyaccounts_gateway.pyreconciliation_gateway.py
- Reworked
adapters/streamlit/service_gateway.pyinto a compatibility aggregator over the new gateway modules. - Repointed
dashboard/app.pystatic call sites away fromservice.*to the owning page/domain gateway modules. - Preserved hot-reload fallback by changing
get_service_callable()to reload the passed gateway module rather than a broad flat service namespace. - Refreshed
docs/project-structure.mdanddocs/runtime-flows.mdso the baseline reflects post-Phase-7 ownership and adapter seams.
Compatibility notes
- MCP tool names, argument shapes, and response contracts were intentionally preserved.
adapters/streamlit/service_gateway.pystill exists as a compatibility surface for any legacy dashboard-side imports.- No SQL/UI business-rule ownership was moved into the dashboard; the app still goes through adapter gateways.
Files changed
jarca_ledger_mcp/adapters/mcp/tool_contracts.pyjarca_ledger_mcp/adapters/mcp/server.pyjarca_ledger_mcp/adapters/streamlit/__init__.pyjarca_ledger_mcp/adapters/streamlit/service_gateway.pyjarca_ledger_mcp/adapters/streamlit/*_gateway.pydashboard/app.pydocs/project-structure.mddocs/runtime-flows.md
Outcome
The repository now has explicit MCP contract and Streamlit page/domain gateway seams, satisfying the final dcy-011 narrowing target while preserving all public compatibility surfaces.