export type CrossMemoryEventType = 'file_save' | 'file_create' | 'file_delete' | 'file_rename' | 'git_commit' | 'package_change' | 'cursor_move' | 'file_focus' | 'file_blur' | 'terminal_command' | 'terminal_command_done' | 'test_run' | 'test_pass' | 'test_fail' | 'build_start' | 'build_end' | 'error' | 'git_branch' | 'ai_prompt' | 'ai_response' | 'session_start' | 'session_end';
export declare const ALL_EVENT_TYPES: CrossMemoryEventType[];
export interface BaseEvent {
    project: string;
    sessionId?: number | null;
}
export interface FileEvent extends BaseEvent {
    filePath: string;
}
export interface CursorMoveEvent extends BaseEvent {
    filePath: string;
    line: number;
    column: number;
    selectionLength?: number;
}
export interface FileFocusEvent extends BaseEvent {
    filePath: string;
    previousFile?: string;
}
export interface TerminalCommandEvent extends BaseEvent {
    command: string;
    cwd: string;
    exitCode?: number;
    durationMs?: number;
}
export interface TestEvent extends BaseEvent {
    testFile: string;
    testName: string;
    durationMs?: number;
    errorMessage?: string;
}
export interface BuildEvent extends BaseEvent {
    buildType: 'tsc' | 'webpack' | 'vite' | 'esbuild' | 'other';
    durationMs: number;
    success: boolean;
    errorCount?: number;
}
export interface ErrorEvent extends BaseEvent {
    errorMessage: string;
    errorType: 'compile' | 'runtime' | 'lint' | 'test' | 'shell' | 'other';
    filePath?: string;
    line?: number;
    stackTrace?: string;
}
export interface GitBranchEvent extends BaseEvent {
    fromBranch: string;
    toBranch: string;
    reason?: 'checkout' | 'create' | 'merge' | 'rebase';
}
export interface AIEvent extends BaseEvent {
    toolName: string;
    prompt?: string;
    response?: string;
    taskType?: string;
    accepted?: boolean;
    durationMs?: number;
}
export interface SessionLifecycleEvent extends BaseEvent {
    toolName: string;
}
export interface CrossMemoryEvent {
    id: number;
    project: string;
    sessionId: number | null;
    eventType: CrossMemoryEventType;
    filePath: string | null;
    line: number | null;
    column: number | null;
    command: string | null;
    exitCode: number | null;
    durationMs: number | null;
    success: number | null;
    metadata: Record<string, unknown>;
    createdAt: string;
}
export declare function recordFileSave(p: FileEvent, metadata?: Record<string, unknown>): number;
export declare function recordFileCreate(p: FileEvent, metadata?: Record<string, unknown>): number;
export declare function recordFileDelete(p: FileEvent, metadata?: Record<string, unknown>): number;
export declare function recordFileRename(p: FileEvent & {
    newPath: string;
}, metadata?: Record<string, unknown>): number;
export declare function recordCursorMove(p: CursorMoveEvent, metadata?: Record<string, unknown>): number;
export declare function recordFileFocus(p: FileFocusEvent, metadata?: Record<string, unknown>): number;
export declare function recordFileBlur(p: FileFocusEvent, metadata?: Record<string, unknown>): number;
export declare function recordTerminalCommand(p: TerminalCommandEvent, metadata?: Record<string, unknown>): number;
export declare function recordTerminalCommandDone(p: TerminalCommandEvent, metadata?: Record<string, unknown>): number;
export declare function recordTestRun(p: BaseEvent, metadata?: Record<string, unknown>): number;
export declare function recordTestPass(p: TestEvent, metadata?: Record<string, unknown>): number;
export declare function recordTestFail(p: TestEvent, metadata?: Record<string, unknown>): number;
export declare function recordBuildStart(p: BaseEvent & {
    buildType: BuildEvent['buildType'];
}, metadata?: Record<string, unknown>): number;
export declare function recordBuildEnd(p: BuildEvent, metadata?: Record<string, unknown>): number;
export declare function recordError(p: ErrorEvent, metadata?: Record<string, unknown>): number;
export declare function recordGitCommit(p: BaseEvent & {
    commitHash: string;
    message: string;
    branch: string;
}, metadata?: Record<string, unknown>): number;
export declare function recordGitBranch(p: GitBranchEvent, metadata?: Record<string, unknown>): number;
export declare function recordAIPrompt(p: AIEvent, metadata?: Record<string, unknown>): number;
export declare function recordAIResponse(p: AIEvent, metadata?: Record<string, unknown>): number;
export declare function recordSessionStart(p: SessionLifecycleEvent, metadata?: Record<string, unknown>): number;
export declare function recordSessionEnd(p: SessionLifecycleEvent, metadata?: Record<string, unknown>): number;
export declare function recordPackageChange(p: BaseEvent & {
    packageName: string;
    oldVersion?: string;
    newVersion: string;
}, metadata?: Record<string, unknown>): number;
export interface TimelineQuery {
    project: string;
    sessionId?: number;
    eventTypes?: CrossMemoryEventType[];
    since?: string;
    until?: string;
    filePath?: string;
    filePattern?: string;
    limit?: number;
}
export declare function getTimeline(query: TimelineQuery): CrossMemoryEvent[];
export declare function getEventCounts(project: string, since?: string): Record<CrossMemoryEventType, number>;
export declare function getLastEventForFile(project: string, filePath: string): CrossMemoryEvent | null;
export declare function getMostRecentEvents(project: string, limit?: number): CrossMemoryEvent[];
export declare function linkSessionToRecentEvents(project: string, sessionId: number, sinceSessionStart?: boolean): number;
export declare function unlinkSessionEvents(sessionId: number): number;
//# sourceMappingURL=event-capture.d.ts.map