### Implement Live Assist Contextual Suggestions Source: https://context7.com/video-db/call.md/llms.txt Shows how to start the Live Assist service with meeting context, provide visual or audio input, and subscribe to AI-generated insights to display suggestions during a call. ```typescript const api = window.electronAPI; await api.liveAssist.start({ name: 'Sales Discovery Call', description: 'Initial call with ACME Corp', questions: [{ question: 'What is their current solution?', answer: 'Legacy in-house system' }], checklist: ['Understand pain points'] }); await api.liveAssist.addTranscript('I think the pricing is too high for our budget', 'system_audio'); await api.liveAssist.addVisualIndex('Pricing page showing $99/month plan'); const unsubscribe = api.liveAssistOn.onUpdate(({ insights, processedAt }) => { if (insights.say_this.length > 0) displaySuggestion('Say This', insights.say_this[0]); if (insights.ask_this.length > 0) displaySuggestion('Ask This', insights.ask_this[0]); }); await api.liveAssist.stop(); await api.liveAssist.clear(); unsubscribe(); ``` -------------------------------- ### Manage Meeting Copilot Lifecycle and Events Source: https://context7.com/video-db/call.md/llms.txt Demonstrates how to initialize, configure, and manage the Meeting Copilot service. It includes starting a call, sending manual transcripts, retrieving metrics, and subscribing to real-time events like nudges and summaries. ```typescript const api = window.electronAPI; await api.copilot.initialize('your-videodb-api-key'); await api.copilot.startCall(recordingId, sessionId); await api.copilot.sendTranscript('me', { text: 'Let me show you the pricing page', is_final: true, start: 120.5, end: 123.2 }); await api.copilot.updateConfig({ enableMetrics: true, enableNudges: true, enableTranscription: true }); const state = await api.copilot.getState(); const result = await api.copilot.endCall(); const unsubscribeTranscript = api.copilotOn.onTranscript((segment) => { console.log(`[${segment.channel}] ${segment.text}`); }); const unsubscribeMetrics = api.copilotOn.onMetrics(({ metrics, health }) => { console.log(`Talk ratio - You: ${metrics.talkRatio.me}%, Them: ${metrics.talkRatio.them}%`); }); const unsubscribeNudge = api.copilotOn.onNudge(({ nudge }) => { showToast(nudge.message, nudge.severity); }); const unsubscribeSummary = api.copilotOn.onCallEnded(({ summary, metrics, duration }) => { console.log('Summary:', summary.shortOverview); }); unsubscribeTranscript(); unsubscribeMetrics(); unsubscribeNudge(); unsubscribeSummary(); ``` -------------------------------- ### Manage Recordings with tRPC API Source: https://context7.com/video-db/call.md/llms.txt This snippet demonstrates how to interact with the Recordings API using tRPC to manage the lifecycle of video recordings. It covers starting, stopping, listing, retrieving details, and downloading videos. Dependencies include the tRPC client setup. ```typescript const startRecordingMutation = trpc.recordings.start.useMutation(); const recording = await startRecordingMutation.mutateAsync({ sessionId: captureSession.sessionId, meetingName: 'Product Demo Call', meetingDescription: 'Demo for prospect ACME Corp', probingQuestions: [ { question: 'What is their budget?', options: ['<$10k', '$10-50k', '>$50k'], answer: '$10-50k' } ], meetingChecklist: ['Show pricing page', 'Demo integrations', 'Discuss timeline'], }); const stopRecordingMutation = trpc.recordings.stop.useMutation(); await stopRecordingMutation.mutateAsync({ sessionId: captureSession.sessionId, }); const recordingsQuery = trpc.recordings.list.useQuery(); const recordingQuery = trpc.recordings.get.useQuery({ recordingId: 123 }); const transcriptQuery = trpc.recordings.getTranscript.useQuery({ recordingId: 123 }); const downloadMutation = trpc.recordings.downloadVideo.useMutation(); const { downloadUrl, name } = await downloadMutation.mutateAsync({ recordingId: 123 }); ``` -------------------------------- ### Control Recording and App Features via Electron IPC Source: https://context7.com/video-db/call.md/llms.txt This snippet shows how to use the Electron preload bridge to communicate between the renderer and main processes for recording controls and app utilities. It covers starting, stopping, pausing/resuming recordings, checking/requesting system permissions, and using app functions like notifications and opening links. It relies on the `window.electronAPI` object exposed by the preload script. ```typescript const api = window.electronAPI; const result = await api.capture.startRecording({ config: { sessionId: 'session-uuid', streams: { microphone: true, systemAudio: true, screen: true, }, }, sessionToken: 'videodb-session-token', accessToken: 'user-access-token', apiUrl: 'https://api.videodb.io', enableTranscription: true, enableVisualIndex: true, }); await api.capture.stopRecording(); await api.capture.pauseTracks(['mic', 'system_audio']); await api.capture.resumeTracks(['mic', 'system_audio', 'screen']); const hasMicPermission = await api.permissions.checkMicPermission(); const hasScreenPermission = await api.permissions.checkScreenPermission(); await api.permissions.requestMicPermission(); await api.permissions.openSystemSettings('Privacy_Microphone'); await api.app.showNotification('Meeting Ended', 'Summary generated successfully'); await api.app.openExternalLink('https://console.videodb.io'); await api.app.openPlayerWindow(playerUrl); ``` -------------------------------- ### Database Operations with Drizzle ORM Source: https://context7.com/video-db/call.md/llms.txt Provides examples of interacting with the SQLite database using the provided db module, including creating recordings and retrieving transcript segments. ```typescript import { createRecording, getRecordingById, getAllRecordings, updateRecording, getTranscriptSegmentsByRecording, createBookmark, getEnabledWorkflows, } from './db'; const recording = createRecording({ sessionId: 'session-uuid', status: 'recording', meetingName: 'Weekly Sync', }); const segments = getTranscriptSegmentsByRecording(recording.id); const workflows = getEnabledWorkflows(); ``` -------------------------------- ### MCP Server Management and Tool Execution (TypeScript) Source: https://context7.com/video-db/call.md/llms.txt Demonstrates how to create, connect to, and manage MCP servers for integrating external tools. It covers server creation (stdio and http transports), tool listing, manual tool execution, event subscription, and setting trigger keywords. Dependencies include the electronAPI. ```typescript const api = window.electronAPI; // Create a new MCP server (stdio transport for local tools) const { server } = await api.mcp.createServer({ name: 'CRM Lookup', transport: 'stdio', command: 'npx', args: ['-y', '@company/crm-mcp-server'], env: { CRM_API_KEY: 'your-key' }, isEnabled: true, autoConnect: true, }); // Create an HTTP MCP server (for remote services) await api.mcp.createServer({ name: 'Documentation Search', transport: 'http', url: 'https://mcp.example.com/docs', headers: { Authorization: 'Bearer token' }, isEnabled: true, autoConnect: false, }); // Connect to a server and get available tools const { tools } = await api.mcp.connect(server.id); // tools: Array<{ name, description, inputSchema, serverId, serverName }> // List all available tools across connected servers const { tools: allTools } = await api.mcp.getTools(); // Execute a tool manually const { result } = await api.mcp.executeTool( server.id, 'lookup_customer', { company_name: 'ACME Corp' } ); // result: MCPDisplayResult with formatted content for display // Get available server templates const { templates } = await api.mcp.getTemplates(); // templates: predefined configurations for common tools (Notion, HubSpot, etc.) // Subscribe to MCP events const unsubscribeResult = api.mcpOn.onResult(({ result }) => { // result: { id, toolCallId, serverId, toolName, displayType, title, content, timestamp } // displayType: 'cue-card' | 'panel' | 'modal' | 'toast' // content: { text?, markdown?, items?, properties?, raw? } displayMCPResult(result); }); const unsubscribeServerConnected = api.mcpOn.onServerConnected(({ serverId, tools }) => { console.log(`Server ${serverId} connected with ${tools.length} tools`); }); const unsubscribeError = api.mcpOn.onServerError(({ serverId, error }) => { console.error(`MCP server error: ${error}`); }); // Set custom trigger keywords for automatic tool invocation await api.mcp.setTriggerKeywords(['customer info', 'lookup', 'documentation', 'pricing']); // Cleanup unsubscribeResult(); unsubscribeServerConnected(); unsubscribeError(); ``` -------------------------------- ### Initialize and Use VideoDB LLM Service Source: https://context7.com/video-db/call.md/llms.txt Demonstrates how to initialize the LLM service and perform various tasks including simple completions, chat history management, JSON-structured responses, and tool calling for agentic workflows. ```typescript import { getLLMService, initLLMService } from './services/llm.service'; const llm = initLLMService('your-videodb-api-key'); const response = await llm.complete('Summarize this meeting transcript: ...', 'You are a helpful meeting assistant.'); const chatResponse = await llm.chatCompletion([ { role: 'system', content: 'You are a meeting analyst.' }, { role: 'user', content: 'What were the main action items?' }, ]); const jsonResponse = await llm.chatCompletionJSON<{ summary: string; topics: string[] }>([ { role: 'system', content: 'Return JSON with summary and topics array.' }, { role: 'user', content: 'Analyze this transcript...' }, ]); const toolResponse = await llm.chatCompletionWithTools( [{ role: 'user', content: 'Look up customer info for ACME Corp' }], [ { type: 'function', function: { name: 'lookup_customer', description: 'Look up customer information by name', parameters: { type: 'object', properties: { company_name: { type: 'string', description: 'Company name to look up' } }, required: ['company_name'], }, }, }, ] ); const analysis = await llm.analyze<{ sentiment: string; confidence: number }>( 'The meeting went really well, everyone was engaged.', 'Analyze the sentiment of this text.', '{ "sentiment": "positive|neutral|negative", "confidence": 0-1 }' ); ``` -------------------------------- ### POST /capture/createSession Source: https://context7.com/video-db/call.md/llms.txt Initializes a new VideoDB capture session to begin recording meeting audio and metadata. ```APIDOC ## POST /capture/createSession ### Description Creates a new capture session via the VideoDB service, allowing the application to start recording streams. ### Method POST ### Endpoint capture.createSession ### Parameters #### Request Body - **metadata** (object) - Required - Metadata associated with the recording session (e.g., source, version). ### Request Example { "metadata": { "source": "call.md", "version": "1.0.2" } } ### Response #### Success Response (200) - **sessionId** (string) - Unique identifier for the recording session. - **collectionId** (string) - The ID of the collection where the recording will be stored. - **endUserId** (string) - The ID of the user initiating the session. - **status** (string) - The current status of the session (e.g., 'created'). #### Response Example { "sessionId": "session-123", "collectionId": "col-456", "endUserId": "user-789", "status": "created" } ``` -------------------------------- ### Summary Generation Service (TypeScript) Source: https://context7.com/video-db/call.md/llms.txt Illustrates how to access and utilize the Summary Generation Service, which creates a narrative overview, key points by topic, and action items from meeting recordings. It shows how to retrieve summaries using the recording API and update checklist completion status. Dependencies include the trpc client. ```typescript // The SummaryGeneratorService is used internally by the copilot // It generates three outputs in parallel: // 1. Short Overview - Narrative paragraph (3-5 sentences) // "John and Sarah discussed the Q3 roadmap priorities. John raised concerns about // the timeline for the mobile app launch. Sarah confirmed the design team can // accelerate their deliverables. They agreed to reconvene next week with updated estimates." // 2. Key Points - Structured by topic // [ // { // topic: "Q3 Roadmap", // points: [ // "John raised concerns about mobile app launch timeline", // "Sarah confirmed design team can accelerate deliverables" // ] // }, // { // topic: "Next Steps", // points: [ // "Team agreed to reconvene next week with updated estimates" // ] // } // ] // 3. Post-Meeting Checklist - Action items // [ // "John to send updated timeline estimates by Friday", // "Sarah to confirm design team availability", // "Schedule follow-up meeting for next Tuesday" // ] // Access summaries via recording API: const recording = await trpc.recordings.get.query({ recordingId: 123 }); console.log('Overview:', recording.shortOverview); console.log('Key Points:', recording.keyPoints); console.log('Action Items:', recording.postMeetingChecklist); // Update checklist completion status await trpc.recordings.updateChecklistCompletion.mutate({ recordingId: 123, completedIndices: [0, 2], // Mark 1st and 3rd items as done }); ``` -------------------------------- ### POST /auth/register Source: https://context7.com/video-db/call.md/llms.txt Registers a new user within the Call.md application by validating a VideoDB API key and initializing a local user account. ```APIDOC ## POST /auth/register ### Description Registers a new user and associates their VideoDB API key with the application. It automatically sets up the 'call.md Recordings' collection. ### Method POST ### Endpoint auth.register ### Parameters #### Request Body - **name** (string) - Required - The user's display name. - **apiKey** (string) - Required - The user's VideoDB API key. ### Request Example { "name": "John Doe", "apiKey": "your-videodb-api-key" } ### Response #### Success Response (200) - **success** (boolean) - Indicates if registration was successful. - **accessToken** (string) - The generated session token for the user. - **name** (string) - The registered user's name. #### Response Example { "success": true, "accessToken": "uuid-access-token", "name": "John Doe" } ``` -------------------------------- ### Register User with VideoDB API Source: https://context7.com/video-db/call.md/llms.txt Demonstrates how to register a new user in the Call.md system using a tRPC mutation. It requires a valid VideoDB API key and returns an access token upon success. ```typescript import { trpc } from '../api/trpc'; const registerMutation = trpc.auth.register.useMutation(); const result = await registerMutation.mutateAsync({ name: 'John Doe', apiKey: 'your-videodb-api-key', }); ``` -------------------------------- ### Manage Recording Sessions with React Hooks Source: https://context7.com/video-db/call.md/llms.txt Shows the implementation of a recording session using the custom useSession hook. It handles starting/stopping recordings and toggling audio/video streams. ```typescript import { useSession } from '../hooks/useSession'; function RecordingComponent() { const { startRecording, stopRecording, isRecording, isStarting, toggleStream, elapsedTime } = useSession(); const handleStart = async () => { await startRecording({ name: 'Weekly Sync', description: 'Team status update', questions: [{ question: 'What blockers do you have?', options: ['None', 'Technical'], answer: '' }], checklist: ['Review sprint progress'] }); }; return (
Duration: {elapsedTime}s
); } ``` -------------------------------- ### VideoDB Service API Interaction (TypeScript) Source: https://context7.com/video-db/call.md/llms.txt Interacts with the VideoDB API for managing video assets. This includes creating service instances, verifying API keys, managing collections, initiating capture sessions, generating tokens for client-side recording, retrieving video details, indexing for search, generating AI insights, and downloading videos. It also provides a utility to clear the connection cache. ```typescript // Create a VideoDB service instance import { createVideoDBService } from './services/videodb.service'; const videodbService = createVideoDBService( 'your-api-key', 'https://api.videodb.io', // optional base URL 'collection-id' // optional collection ID ); // Verify API key is valid const isValid = await videodbService.verifyApiKey(); // Find or create the call.md collection const collectionId = await videodbService.findOrCreateCallMdCollection(); // Create a capture session for recording const session = await videodbService.createCaptureSession({ endUserId: 'user-123', metadata: { source: 'call.md' }, }); // session: { sessionId, collectionId, endUserId, status } // Generate session token for client-side recording const tokenResult = await videodbService.createSessionToken('user-123', 86400); // tokenResult: { sessionToken, expiresIn, expiresAt } // Get video details const video = await videodbService.getVideo('video-id'); // Index video for spoken words (enables search) await videodbService.indexVideo('video-id'); // Generate AI insights from video transcript const insights = await videodbService.generateInsights('video-id', customPrompt); // Returns markdown-formatted meeting report // Download video const { downloadUrl, name } = await videodbService.downloadVideo('video-id', 'meeting-recording'); // Clear connection cache (useful for switching API keys) VideoDBService.clearCache(); ``` -------------------------------- ### Generate Meeting Preparation Materials with tRPC Source: https://context7.com/video-db/call.md/llms.txt Uses tRPC mutations to generate probing questions based on meeting context and subsequently creates a meeting checklist from user-provided answers. This flow is essential for preparing for discovery calls. ```typescript const generateQuestionsMutation = trpc.meetingSetup.generateQuestions.useMutation(); const questionsResult = await generateQuestionsMutation.mutateAsync({ name: 'Discovery Call - ACME Corp', description: 'Initial call to understand their current pain points with legacy systems', }); const generateChecklistMutation = trpc.meetingSetup.generateChecklist.useMutation(); const checklistResult = await generateChecklistMutation.mutateAsync({ name: 'Discovery Call - ACME Corp', description: 'Initial call to understand their current pain points', questions: questionsResult.questions.map(q => ({ ...q, answer: 'Integration issues', })), }); ``` -------------------------------- ### Google Calendar API Integration (TypeScript) Source: https://context7.com/video-db/call.md/llms.txt Connects to the Google Calendar API via Electron's IPC to manage upcoming meetings. It supports signing in/out, checking authentication status, retrieving events, marking meetings for recording, and subscribing to real-time updates. Dependencies include the Electron API. ```typescript // Calendar API via IPC const api = window.electronAPI; // Sign in to Google Calendar const signInResult = await api.calendar.signIn(); if (signInResult.success) { console.log('Signed in:', signInResult.email); } // Check authentication status const authStatus = await api.calendar.isSignedIn(); // authStatus: { isSignedIn, email? } // Get upcoming meetings (default 24 hours) const { events } = await api.calendar.getUpcomingEvents(48); // 48 hours ahead // events: UpcomingMeeting[] // { // id: "event-id", // title: "Weekly Sync", // description: "Team meeting", // startTime: "2024-01-15T10:00:00Z", // endTime: "2024-01-15T10:30:00Z", // attendees: ["john@example.com", "sarah@example.com"], // meetingLink?: "https://meet.google.com/abc-xyz" // } // Mark a meeting for recording (used for meeting prep flow) await api.calendar.setRecordingMeeting('event-id'); // Subscribe to calendar events const unsubscribeEvents = api.calendarOn.onEventsUpdated((events) => { // Triggered when calendar is refreshed updateMeetingsList(events); }); const unsubscribeMeetingSetup = api.calendarOn.onOpenMeetingSetup((meeting) => { // Triggered when user should prepare for upcoming meeting openMeetingSetupFlow(meeting); }); const unsubscribeAutoStart = api.calendarOn.onAutoStartRecording((meeting) => { // Triggered when it's time to start recording (based on preferences) startRecordingForMeeting(meeting); }); // Sign out await api.calendar.signOut(); // Cleanup unsubscribeEvents(); unsubscribeMeetingSetup(); unsubscribeAutoStart(); ``` -------------------------------- ### Electron IPC Capture API Source: https://context7.com/video-db/call.md/llms.txt Bridge methods for controlling local hardware streams, managing system permissions, and triggering native app notifications. ```APIDOC ## IPC api.capture.startRecording ### Description Starts local hardware capture including microphone, system audio, and screen streams via the Electron bridge. ### Method IPC ### Endpoint api.capture.startRecording ### Request Body - **config** (object) - Required - Stream configuration (mic, systemAudio, screen) - **sessionToken** (string) - Required - Auth token for VideoDB - **enableTranscription** (boolean) - Optional - Toggle for real-time transcription ### Response - **success** (boolean) - Status of the operation - **micWsConnectionId** (string) - WebSocket ID for microphone stream ``` ```APIDOC ## IPC api.permissions.checkMicPermission ### Description Checks if the application has system-level access to the microphone. ### Method IPC ### Endpoint api.permissions.checkMicPermission ### Response - **hasPermission** (boolean) - True if access is granted ``` -------------------------------- ### Define Capture Session tRPC Procedure Source: https://context7.com/video-db/call.md/llms.txt Defines the backend tRPC procedure for creating a VideoDB capture session. It validates input against a schema and interacts with the VideoDB service to initialize a session. ```typescript export const captureRouter = router({ createSession: protectedProcedure .input(CreateCaptureSessionInputSchema) .output(CaptureSessionSchema) .mutation(async ({ ctx, input }) => { const { user } = ctx; const videodbService = createVideoDBService(user.apiKey, runtimeConfig.apiUrl, user.collectionId); return await videodbService.createCaptureSession({ endUserId: `user-${user.id}`, metadata: input.metadata, }); }), }); ``` -------------------------------- ### Manage Workflow Webhooks via Electron IPC Source: https://context7.com/video-db/call.md/llms.txt Provides an interface to manage external automation webhooks using the Electron IPC bridge. Supports CRUD operations for webhooks and testing connectivity to external endpoints. ```typescript const api = window.electronAPI; const { workflow } = await api.workflows.create({ name: 'n8n Meeting Summary', webhookUrl: 'https://n8n.example.com/webhook/meeting-complete', enabled: true, }); await api.workflows.update(workflow.id, { enabled: false }); const testResult = await api.workflows.test('https://n8n.example.com/webhook/test'); const { workflows } = await api.workflows.getAll(); await api.workflows.delete(workflow.id); ``` -------------------------------- ### tRPC Recordings API Source: https://context7.com/video-db/call.md/llms.txt Endpoints for managing the recording lifecycle, retrieving metadata, transcripts, and generating download URLs. ```APIDOC ## POST trpc.recordings.start ### Description Initializes a new recording session with meeting metadata, probing questions, and checklists. ### Method POST ### Endpoint trpc.recordings.start ### Request Body - **sessionId** (string) - Required - Unique ID for the capture session - **meetingName** (string) - Required - Title of the meeting - **meetingDescription** (string) - Optional - Context for the meeting - **probingQuestions** (array) - Optional - List of questions with options and answers - **meetingChecklist** (array) - Optional - List of tasks to cover during the call ### Response - **recording** (object) - The created recording object including ID and status. ``` ```APIDOC ## GET trpc.recordings.get ### Description Retrieves full details for a specific recording, including metrics and post-meeting analysis. ### Method GET ### Endpoint trpc.recordings.get ### Parameters #### Query Parameters - **recordingId** (number) - Required - The ID of the recording to fetch ### Response - **shortOverview** (string) - AI-generated summary - **keyPoints** (array) - List of extracted key points - **metricsSnapshot** (object) - Performance and engagement metrics ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.