import type Database from "better-sqlite3";
import type { DashboardAgentStatusKind, DashboardAgentStatusSummary } from "../../contracts/dashboard-summary-run.js";
export declare const DASHBOARD_AGENT_STATUS_KINDS: readonly DashboardAgentStatusKind[];
export type AgentActivityLease = {
    schemaVersion: 1;
    activityId: string;
    agentId: string;
    sessionId: string;
    kind: DashboardAgentStatusKind;
    label: string;
    startedAt: string;
    updatedAt: string;
    expiresAt: string;
    taskId: string | null;
    command: string | null;
    phaseKey: string | null;
    prNumber: number | null;
    version: string | null;
    details: Record<string, unknown> | null;
};
export type SetAgentActivityInput = {
    activityId: string;
    agentId: string;
    sessionId?: string | null;
    kind: DashboardAgentStatusKind;
    label: string;
    now: string;
    expiresAt: string;
    taskId?: string | null;
    command?: string | null;
    phaseKey?: string | null;
    prNumber?: number | null;
    version?: string | null;
    details?: Record<string, unknown> | null;
};
export declare function normalizeAgentActivityKind(raw: unknown): DashboardAgentStatusKind | null;
export declare function setAgentActivityLease(db: Database.Database, input: SetAgentActivityInput): AgentActivityLease;
export declare function heartbeatAgentActivityLease(db: Database.Database, args: {
    activityId: string;
    now: string;
    expiresAt: string;
}): AgentActivityLease | null;
export declare function clearAgentActivityLeases(db: Database.Database, filters: {
    activityId?: string;
    agentId?: string;
    sessionId?: string;
}): number;
export declare function listCurrentAgentActivityLeases(db: Database.Database | undefined, now: string): AgentActivityLease[];
export declare function readCurrentAgentActivityLease(db: Database.Database | undefined, now: string): AgentActivityLease | null;
export declare function agentActivityLeaseToDashboardStatus(lease: AgentActivityLease): DashboardAgentStatusSummary;
