export type SSEEventType = 'heartbeat' | 'increment-update' | 'analytics-event' | 'cost-update' | 'notification' | 'sync-update' | 'sync-audit' | 'error-detected' | 'config-changed' | 'activity' | 'command-output' | 'command-complete' | 'job-progress' | 'marketplace-scan' | 'submission-update' | 'verification-complete' | 'hook-event' | 'hook-agent' | 'sync-error';
export interface SSEMessage {
    type: SSEEventType;
    data: unknown;
    timestamp: string;
}
export interface OverviewPayload {
    project: {
        name?: string;
        totalIncrements: number;
        activeIncrements: number;
        completedIncrements: number;
        statusBreakdown: Record<string, number>;
        typeBreakdown: Record<string, number>;
        priorityBreakdown: Record<string, number>;
    };
    analytics: {
        totalEvents: number;
        successRate: number;
        last24hEvents: number;
    };
    costs: {
        totalCost: number;
        totalSavings: number;
        totalTokens: number;
        sessionCount: number;
        billingContext?: {
            planType: 'api' | 'subscription';
            monthlyAmount?: number;
        };
    };
    notifications: {
        pendingCount: number;
        criticalCount: number;
    };
    sync: {
        platforms: Record<string, {
            lastImport: string;
            lastSyncResult: string;
        }>;
    };
    generatedAt: string;
}
export interface IncrementSummary {
    id: string;
    title: string;
    status: string;
    type: string;
    priority: string;
    project?: string;
    tasks: {
        total: number;
        completed: number;
    };
    acs: {
        total: number;
        completed: number;
    };
    createdAt: string;
    lastActivity: string;
}
export interface IncrementListPayload {
    increments: IncrementSummary[];
    summary: Record<string, number>;
    pagination?: {
        total: number;
        limit: number;
        offset: number;
        hasMore: boolean;
    };
}
export interface IncrementDetailPayload {
    id: string;
    metadata: Record<string, unknown>;
    tasks: Array<{
        id: string;
        title: string;
        status: string;
        userStory?: string;
        satisfiesACs?: string[];
    }>;
    taskSummary: {
        total: number;
        completed: number;
        pending: number;
        inProgress: number;
    };
    costs?: {
        totalCost: number;
        totalTokens: number;
        sessionCount: number;
    };
}
export interface SyncPlatformInfo {
    lastImport: string;
    lastImportCount?: number;
    lastSkippedCount?: number;
    lastSyncResult?: string;
    connectionStatus?: string;
    diagnosticMessage?: string;
    configDetail?: string;
}
export interface SyncRepoStatus {
    repoId: string;
    repoName: string;
    repoPath: string;
    hasSpecweave: boolean;
    platforms: Record<string, SyncPlatformInfo>;
}
export interface SyncPermissions {
    canUpsertInternalItems: boolean;
    canUpdateExternalItems: boolean;
    canUpdateStatus: boolean;
    autoSyncOnCompletion: boolean;
}
export interface SyncStatusPayload {
    platforms: Record<string, SyncPlatformInfo>;
    lastUpdated?: string;
    isUmbrella?: boolean;
    repos?: SyncRepoStatus[];
    permissions?: SyncPermissions;
}
export interface ActivityEvent {
    timestamp: string;
    category: 'command' | 'sync' | 'hook' | 'error' | 'cost' | 'notification';
    severity: 'info' | 'warning' | 'error';
    title: string;
    detail?: string;
    source: string;
    metadata?: Record<string, unknown>;
}
export interface CommandExecution {
    id: string;
    command: string;
    args: string[];
    status: 'running' | 'completed' | 'failed';
    startedAt: string;
    output: string[];
    exitCode?: number;
}
export interface SessionSummary {
    sessionId: string;
    startTime: string;
    endTime?: string;
    messageCount: number;
    toolCallCount: number;
    errors: SessionError[];
    version: string;
    gitBranch: string;
}
export interface SessionError {
    timestamp: string;
    sessionId: string;
    type: 'prompt_too_long' | 'api_error' | 'tool_failure' | 'hook_error' | 'rate_limit' | 'unknown';
    message: string;
    context?: {
        toolName?: string;
        toolInput?: string;
        messageIndex?: number;
        /** What the assistant was doing right before this error */
        precedingAction?: string;
        /** Recent tool calls leading up to the error (last 3) */
        recentTools?: Array<{
            name: string;
            input: string;
        }>;
    };
}
export interface ErrorGroup {
    type: string;
    count: number;
    lastSeen: string;
    sessions: number;
    recentMessages: string[];
}
export interface PaginatedErrors {
    total: number;
    errors: SessionError[];
    offset: number;
    limit: number;
}
export interface ErrorTimelineBucket {
    start: string;
    end: string;
    count: number;
    byType: Record<string, number>;
}
export interface PluginInfo {
    name: string;
    version: string;
    skillCount: number;
    commandCount: number;
}
export interface SkillUsage {
    name: string;
    plugin: string;
    count: number;
    successCount: number;
    failureCount: number;
    avgDuration?: number;
    lastUsed: string;
}
export interface LspStatus {
    checked: string;
    status: string;
    missing: Array<{
        language: string;
        type: string;
        binaryInstall: string;
        pluginInstall: string;
        plugin: string;
        message: string;
    }>;
    stats: {
        totalLanguages: number;
        checkedLanguages: number;
        binaryMissing: number;
        pluginMissing: number;
    };
}
export interface RepoInfo {
    name: string;
    org: string;
    path: string;
    remote?: string;
    branch?: string;
    hasSpecweave: boolean;
    isUmbrellaManaged?: boolean;
    isCurrent?: boolean;
    lastModified?: string;
}
export type { CostsSummaryPayload, SessionTokenSummary } from './server/data/cost-aggregator.js';
export type ConfigPayload = Record<string, unknown>;
export interface ProjectInfo {
    id: string;
    path: string;
    name: string;
    hasSpecweave: boolean;
}
export interface DashboardLockFile {
    port: number;
    pid: number;
    startedAt: string;
    projects: string[];
}
export interface ApiResponse<T> {
    ok: boolean;
    data?: T;
    error?: string;
}
export type RouteHandler = (req: import('http').IncomingMessage, res: import('http').ServerResponse, params: Record<string, string>) => Promise<void>;
export type CCHookEventName = 'PreToolUse' | 'PostToolUse' | 'Stop' | 'SubagentStop' | 'TaskCompleted' | 'UserPromptSubmit' | 'PostToolUseFailure' | 'PermissionRequest' | 'SessionStart' | 'SessionEnd' | 'Notification' | 'SubagentStart' | 'ConfigChange' | 'PreCompact' | 'TeammateIdle';
export interface HookEvent {
    id: string;
    eventName: CCHookEventName;
    sessionId: string;
    timestamp: string;
    payload: unknown;
    result?: {
        decision?: 'allow' | 'deny' | 'approve' | 'block';
        reason?: string;
    };
    durationMs?: number;
}
export interface AgentRecord {
    agentId: string;
    agentType: string;
    sessionId: string;
    startedAt: string;
    stoppedAt?: string;
    durationMs?: number;
}
//# sourceMappingURL=types.d.ts.map