/**
 * Event Processor — source-agnostic event capture processing
 *
 * Accepts a common MeetingPayload from any capture source (desktop client,
 * external integrations, calendar, manual) and writes an `event` entity
 * with `type: meeting` (the default). Handles:
 * 1. Entity creation with proper frontmatter
 * 2. Participant resolution to existing person entities
 * 3. LLM-powered summary generation from transcript
 * 4. Structured extraction (action items, decisions)
 * 5. Task entity creation from action items
 * 6. Body template population
 *
 * Today the only event capture surface is meeting recording, so the
 * payload type is still MeetingPayload — generalizing the payload shape
 * is a follow-up when/if other event sources land.
 */
import type { WorkspaceManager } from '../core/workspace-manager.js';
import type { WsHub } from '../server/ws-hub.js';
import type { YjsManager } from '../server/yjs-manager.js';
import type { GitUser } from './git.js';
export interface MeetingPayload {
    /** Unique ID from the source (e.g., desktop session ID, calendar event ID) */
    sourceId: string;
    /** Source identifier: 'desktop-client', 'calendar', 'manual', or an integration ID */
    source: string;
    /** Meeting title */
    title: string;
    /** ISO datetime when the meeting started */
    startedAt: string;
    /** ISO datetime when the meeting ended */
    endedAt?: string;
    /** Duration in minutes */
    durationMinutes?: number;
    /** Participants */
    participants: MeetingParticipant[];
    /** Transcript segments (if available) */
    transcript?: TranscriptSegment[];
    /** Raw transcript as text (alternative to segments) */
    transcriptText?: string;
    /** User-written memo/notes */
    memo?: string;
    /** Meeting platform (e.g., 'google-meet', 'zoom', 'teams') */
    platform?: string;
    /** Meeting URL */
    meetingUrl?: string;
    /** Pre-generated summary (some sources provide their own) */
    existingSummary?: string;
    /** Additional metadata from the source */
    metadata?: Record<string, any>;
}
export interface MeetingParticipant {
    name: string;
    email?: string;
    isSelf?: boolean;
}
export interface TranscriptSegment {
    speaker: string;
    text: string;
    timestamp: number;
    isFinal?: boolean;
    channel?: 'mic' | 'tab';
}
export interface ProcessingResult {
    entityId: string;
    repo: string;
    url: string;
    attendeeLinks: string[];
    extractionPending: boolean;
    tasksCreated: string[];
}
export declare class EventProcessor {
    private workspaceManager;
    private wsHub?;
    private yjsManager?;
    constructor(workspaceManager: WorkspaceManager, wsHub?: WsHub | undefined, yjsManager?: YjsManager | undefined);
    /**
     * Process a meeting payload: create entity, resolve participants,
     * generate summary asynchronously.
     */
    process(payload: MeetingPayload, repo: string, user?: GitUser): Promise<ProcessingResult>;
    /**
     * Process a meeting for an entity that already exists (created by the web app).
     * Meeting capture UI flow: entity was created when recording started,
     * user typed notes in it, now we add the transcript and generate the summary.
     */
    processExisting(payload: MeetingPayload, repo: string, existingEntityId: string, user?: GitUser): Promise<ProcessingResult>;
    /**
     * Async processing: LLM summary, extraction, task creation
     */
    private processAsync;
    /**
     * Create a task entity from an action item string, linked to the event.
     */
    private createTask;
    private generateEntityId;
    resolveParticipants(participants: MeetingParticipant[], repo: string): Promise<string[]>;
    private formatTranscript;
    private generateSummary;
    private extractStructuredData;
    private getModelConfig;
    private broadcast;
    private slugify;
}
