Skip to content

Feat: Add external API gateway clients and integration endpoints (Phase 3)#209

Closed
jhodapp wants to merge 17 commits intomainfrom
feature/146-ai-meeting-integration-phase3-integrations
Closed

Feat: Add external API gateway clients and integration endpoints (Phase 3)#209
jhodapp wants to merge 17 commits intomainfrom
feature/146-ai-meeting-integration-phase3-integrations

Conversation

@jhodapp
Copy link
Copy Markdown
Member

@jhodapp jhodapp commented Dec 20, 2025

Description

Add external API gateway clients for Recall.ai, AssemblyAI, and Google OAuth with configurable base URLs. Create integration controller endpoints for API key verification, OAuth flow handling, and coaching relationship updates.

GitHub Issue: Relates to #146

Changes

Gateway Clients:

  • Add RecallAiClient gateway for meeting bot creation and management with proper null handling
  • Add AssemblyAiClient gateway for transcription requests with LeMUR integration
  • Add GoogleOAuthClient gateway for OAuth flow and token management
  • Add GoogleMeetClient gateway for Google Meet space creation
  • Add configurable external API base URLs via environment variables in config.rs

LeMUR Integration:

  • Add LeMUR API types: LemurTaskRequest, LemurTaskResponse, ExtractedAction, ExtractedAgreement
  • Add extract_actions_and_agreements() method for analyzing transcripts
  • Add generate_coaching_summary() method for session summaries
  • Fixed LeMUR base URL handling (strips /v2 prefix for LeMUR endpoints)

Controllers:

  • Add integration_controller with endpoints for verifying Recall.ai and AssemblyAI API keys
  • Add oauth_controller with Google OAuth authorize and callback endpoints
  • Add coaching_relationship_controller for updating meeting URL and dual AI privacy levels
  • Update routing to include new OAuth and integration endpoints
  • Add new params modules for integration and coaching relationship updates

Logging Improvements:

  • Silence verbose SQLx, SeaORM, tower, and axum dependency logs
  • Upgrade external API errors from WARN to ERROR level for easier filtering

Recent Changes

  • Fixed Recall.ai JSON deserialization for null values in API responses
  • Fixed LeMUR base URL to correctly use /lemur/v3/ path
  • Added dual privacy level support in coaching relationship controller
  • Silenced tracing span lifecycle logs (call;, get_record;)

Testing Strategy

  • Run cargo check and cargo clippy to verify compilation
  • Run cargo test to ensure existing tests pass
  • Manual testing of OAuth flow requires Google OAuth credentials configured
  • API key verification endpoints can be tested with valid Recall.ai/AssemblyAI keys

Concerns

  • OAuth callback redirects to /settings/integrations?google=connected - requires frontend settings page
  • External API clients include proper error handling with ERROR level logging

Add database schema, entities, and CRUD operations for the AI meeting
recording and transcription integration:

Database Migrations:
- Add user_integrations table for encrypted API credentials
- Add ai_privacy_level enum and meeting_url to coaching_relationships
- Add meeting_recordings, transcriptions, transcript_segments tables
- Add ai_suggested_items table for AI-detected actions/agreements

Entity Definitions:
- user_integrations (Google OAuth, Recall.ai, AssemblyAI credentials)
- meeting_recordings (Recall.ai bot tracking)
- transcriptions (AssemblyAI transcript data)
- transcript_segments (speaker-diarized utterances)
- ai_suggested_items (pending AI suggestions)
- Enums: ai_privacy_level, meeting_recording_status, transcription_status,
  sentiment, ai_suggestion_type, ai_suggestion_status

Entity API:
- CRUD operations for user_integration, meeting_recording, transcription,
  and ai_suggested_item modules

Other:
- AES-256-GCM encryption utilities for API key storage
- Config additions for external service credentials
- Update coaching_relationships with meeting_url and ai_privacy_level

Relates to: refactor-group/refactor-platform-fe#146
…se 3)

Add gateway clients for Recall.ai, AssemblyAI, and Google OAuth with
configurable base URLs. Create integration controller endpoints for
API key verification and OAuth flow handling.
Add start/stop recording endpoints that integrate with Recall.ai bot
for meeting capture. Add webhook handler for receiving recording
status updates from Recall.ai.
- Add transcript_segment entity_api module with CRUD operations
- Add AssemblyAI webhook handler for transcription callbacks
- Create transcription controller with transcript/segments/summary endpoints
- Update router with transcription routes
- Export transcript_segment and transcription modules from domain
- Add ai_suggestion_controller with endpoints for suggestion management
- Implement accept flow that creates Actions or Agreements from suggestions
- Implement dismiss flow to mark suggestions as dismissed
- Export ai_suggested_item module from domain
- Add routes for GET /coaching_sessions/:id/ai-suggestions
- Add routes for POST /ai-suggestions/:id/accept and /dismiss
- Add nested response structures for Recall.ai video URL extraction
  (recordings[0].media_shortcuts.video_mixed.data.download_url)
- Add backend polling for Recall.ai bot status when frontend requests
- Fix AssemblyAI webhook field name mismatch (id vs transcript_id)
- Fetch full transcript from AssemblyAI API on webhook notification
  (webhooks are notifications only, don't include transcript data)
- Add comprehensive debug logging for troubleshooting
- Add serde(rename_all = "snake_case") to AiPrivacyLevel enum
- Add serde(default) to UpdateParams fields for optional deserialization
- Add Default derive to UpdateParams struct
- Add action item extraction after transcription completes
- Create AI suggestion records for each detected action item
- Use keyword-based extraction (will, going to, need to, should, etc.)
- Log extraction results for debugging
- Add LeMUR API client for extracting actions/agreements from transcripts
- Implement dual AI privacy levels (coach + coachee must both consent)
- Add manual extraction endpoints for actions and agreements
- Fix Recall.ai JSON deserialization for null values
- Fix serde serialization to use lowercase enum variants
- Upgrade API error logs from WARN to ERROR level
- Silence verbose SQLx/SeaORM query logs
- Add auto_approve_ai_suggestions field to user integrations
- Add stated_by, assigned_to, source_segment fields to AI suggestions
@jhodapp jhodapp self-assigned this Dec 24, 2025
@jhodapp jhodapp added the prototype Prototyping a major new feature. label Dec 24, 2025
@jhodapp jhodapp marked this pull request as draft December 24, 2025 18:42
@jhodapp
Copy link
Copy Markdown
Member Author

jhodapp commented Dec 24, 2025

Consolidated into #213 - AI Meeting Recording Integration

@jhodapp jhodapp closed this Dec 24, 2025
@jhodapp jhodapp deleted the feature/146-ai-meeting-integration-phase3-integrations branch December 24, 2025 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

prototype Prototyping a major new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant