import type { ModuleLifecycleContext } from "../../contracts/module-contract.js";
import type { DashboardAgentStatusKind } from "../../contracts/dashboard-summary-run.js";
import type { OpenedPlanningStores } from "./persistence/planning-open.js";
import type { TaskEntity } from "./types.js";
import { type AgentActivityLease } from "./agent-activity-store.js";
export type AgentActivityIdentityInput = {
    activityId?: unknown;
    agentId?: unknown;
    sessionId?: unknown;
};
export type RecordAgentActivityInput = AgentActivityIdentityInput & {
    kind: DashboardAgentStatusKind;
    label?: string | null;
    taskId?: string | null;
    command?: string | null;
    phaseKey?: string | null;
    prNumber?: number | null;
    version?: string | null;
    details?: Record<string, unknown> | null;
    now?: string | null;
    ttlSeconds?: number | null;
};
export type ClearAgentActivityInput = AgentActivityIdentityInput & {
    taskId?: string | null;
};
export declare function resolveAgentActivityIdentity(ctx: ModuleLifecycleContext, input?: AgentActivityIdentityInput): {
    agentId: string;
    sessionId: string;
    activityId: string;
};
export declare function buildAgentActivityLabel(args: {
    kind: DashboardAgentStatusKind;
    taskId?: string | null;
    command?: string | null;
    phaseKey?: string | null;
    prNumber?: number | null;
    version?: string | null;
    details?: Record<string, unknown> | null;
}): string;
export declare function recordAgentActivity(ctx: ModuleLifecycleContext, planning: OpenedPlanningStores, input: RecordAgentActivityInput): AgentActivityLease;
export declare function recordAgentActivityBestEffort(ctx: ModuleLifecycleContext, planning: OpenedPlanningStores, input: RecordAgentActivityInput): AgentActivityLease | null;
export declare function clearAgentActivity(ctx: ModuleLifecycleContext, planning: OpenedPlanningStores, input?: ClearAgentActivityInput): number;
export declare function clearAgentActivityBestEffort(ctx: ModuleLifecycleContext, planning: OpenedPlanningStores, input?: ClearAgentActivityInput): number;
export declare function recordTaskTransitionActivityBestEffort(ctx: ModuleLifecycleContext, planning: OpenedPlanningStores, args: {
    task: TaskEntity | undefined;
    taskId: string;
    action: string;
    command: string;
}): void;
