"""No-op stub services. Cross-app calls now go over HTTP via call_action() / fetch_data(). Stubs are no longer needed for the 4 main domains (blog, calendar, market, cart). Only StubFederationService remains as a safety net for apps that conditionally load AP infrastructure. """ from __future__ import annotations class StubFederationService: """No-op federation stub for apps that don't load AP.""" async def get_actor_by_username(self, session, username): return None async def get_actor_by_user_id(self, session, user_id): return None async def publish_activity(self, session, *, actor_user_id, activity_type, object_type, object_data, source_type=None, source_id=None): return None async def get_activity_for_source(self, session, source_type, source_id): return None async def count_activities_for_source(self, session, source_type, source_id, *, activity_type): return 0 async def get_stats(self, session): return {"actors": 0, "activities": 0, "followers": 0}