Add origin_app to APActivity — apps only process their own activities

Each app's EventProcessor now filters by origin_app so apps don't steal
each other's pending activities. emit_activity() and publish_activity()
auto-detect the app name from Quart's current_app.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-22 20:57:46 +00:00
parent b42f5d63db
commit 86ccfd25c5
6 changed files with 57 additions and 5 deletions

View File

@@ -144,7 +144,7 @@ def create_base_app(
return await base_context()
# --- event processor ---
_event_processor = EventProcessor()
_event_processor = EventProcessor(app_name=name)
# --- startup ---
@app.before_serving