Meetings Developer Guide
February 24, 2026 ยท View on GitHub
This guide is for contributors maintaining and extending Meeting Intelligence (/api/v1/meetings/*).
Module Overview
Primary code roots:
- Endpoints:
tldw_Server_API/app/api/v1/endpoints/meetings.py - Schemas:
tldw_Server_API/app/api/v1/schemas/meetings_schemas.py - DB access:
tldw_Server_API/app/core/DB_Management/Meetings_DB.py - Domain services:
tldw_Server_API/app/core/Meetings/session_service.pytldw_Server_API/app/core/Meetings/template_service.pytldw_Server_API/app/core/Meetings/artifact_service.pytldw_Server_API/app/core/Meetings/events_service.pytldw_Server_API/app/core/Meetings/integration_service.py
- WS/HTTP deps:
tldw_Server_API/app/api/v1/API_Deps/Meetings_DB_Deps.py
- Retry worker:
tldw_Server_API/app/services/meetings_webhook_dlq_service.py
Request Path and Dependencies
HTTP routes
Meetings HTTP handlers are defined as sync def handlers and include:
Depends(get_meetings_db_for_user)for per-user DB scope.Depends(check_rate_limit)for ingress rate limiting.
list_templates validates scope at the schema layer using MeetingTemplateScope.
WebSocket route
/sessions/{session_id}/stream uses get_meetings_db_for_websocket, which:
- Extracts auth from:
Authorization: Bearer ...X-API-KEYsec-websocket-protocolbearer format- query
token/api_key
- Builds a request-like object and delegates to
get_request_user. - Initializes per-user
MeetingsDatabase.
Data Model
Core tables in Meetings_DB:
meeting_sessionsmeeting_templatesmeeting_artifactsmeeting_integration_dispatchmeeting_event_log
meeting_artifacts, meeting_integration_dispatch, and meeting_event_log enforce:
FOREIGN KEY(session_id) REFERENCES meeting_sessions(id) ON DELETE CASCADE
Migration logic in _run_schema_migrations rebuilds older dispatch/event tables if cascade FKs are missing.
Event Semantics
MeetingEventsService.emit(...) writes to meeting_event_log, then returns a normalized envelope.
WebSocket persistence behavior:
transcript.partial(and interim aliases): emitted to client only, not persisted.transcript.final(or payloads markedfinal/is_final): persisted.- Unknown
transcript.*variants except partial are treated as persistent transcript events.
This keeps event-log growth bounded during long live sessions while preserving stable checkpoints.
Sharing and DLQ Worker
Share endpoints enqueue dispatch rows via MeetingIntegrationService.queue_dispatch(...).
run_meetings_webhook_dlq_worker:
- Discovers per-user media DB targets.
- Reuses
MeetingsDatabaseinstances across loop iterations (cached by(db_path, user_id)). - Claims due dispatches with
claim_due_integration_dispatches. - Applies egress policy and backoff retry rules.
- Emits
integration.retrying,integration.delivered, orintegration.failedevents.
Control variables:
MEETINGS_WEBHOOK_DLQ_ENABLEDMEETINGS_WEBHOOK_DLQ_INTERVAL_SECMEETINGS_WEBHOOK_DLQ_BATCHMEETINGS_WEBHOOK_DLQ_TIMEOUT_SECMEETINGS_WEBHOOK_DLQ_MAX_ATTEMPTSMEETINGS_WEBHOOK_DLQ_BASE_SECMEETINGS_WEBHOOK_DLQ_MAX_BACKOFF_SEC
Extension Patterns
Add a new artifact type
- Update
MeetingArtifactKindliteral in schemas. - Add DB validation support in
_ARTIFACT_KINDS. - Extend
MeetingArtifactService._build_finalize_payloads. - Add unit + API tests.
Add a new integration target
- Extend
MeetingIntegrationTypeliteral. - Add queue-time validation in
integration_service. - Extend worker dispatch routing logic.
- Add integration API + worker tests.
Add new WS event types
- Decide transient vs persistent semantics.
- Update
_resolve_ws_event_persistencemapping. - Add WS tests asserting event log behavior.
Testing
Meetings tests live under tldw_Server_API/tests/Meetings.
Targeted suite:
source .venv/bin/activate
python -m pytest -q tldw_Server_API/tests/Meetings/test_meetings_db.py \
tldw_Server_API/tests/Meetings/test_meetings_artifact_service.py \
tldw_Server_API/tests/Meetings/test_meetings_sessions_api.py \
tldw_Server_API/tests/Meetings/test_meetings_templates_api.py \
tldw_Server_API/tests/Meetings/test_meetings_stream_ws.py \
tldw_Server_API/tests/Meetings/test_meetings_events_sse.py \
tldw_Server_API/tests/Meetings/test_meetings_integrations_api.py \
tldw_Server_API/tests/Meetings/test_meetings_ingest_finalize_api.py \
tldw_Server_API/tests/Meetings/test_meetings_webhook_dlq_worker.py
Note: full suite runs can still hit environment-specific heavy import crashes in test_meetings_routes_smoke depending on local ML/native library state.
Documentation Cross-References
- Product PRD:
Docs/Product/Meeting-Transcripts-PRD.md - API contract/design:
Docs/Design/Meeting_Intelligence_API.md