import type { z } from "zod";
import type { Logger } from "pino";
import type { ProviderSnapshotManager } from "./provider-snapshot-manager.js";
import type { AgentManager, ManagedAgent } from "./agent-manager.js";
import type { AgentStorage } from "./agent-storage.js";
import { scheduleAgentMetadataGeneration } from "./agent-metadata-generator.js";
import type { StructuredGenerationDaemonConfig } from "./structured-generation-providers.js";
import type { FetchRecentProviderSessionsRequestMessage, ImportAgentRequestMessageSchema, RecentProviderSessionDescriptorPayload } from "@kong-link/protocol/messages";
import type { WorkspaceGitService } from "../workspace-git-service.js";
type ImportAgentRequestMessage = z.infer<typeof ImportAgentRequestMessageSchema>;
export interface NormalizedImportAgentRequest {
    provider: string;
    providerHandleId: string;
    cwd?: string;
    labels?: Record<string, string>;
    requestId: string;
}
export declare class ImportSessionsRequestError extends Error {
    readonly code: string;
    constructor(code: string, message: string);
}
export interface ListImportableProviderSessionsInput {
    request: FetchRecentProviderSessionsRequestMessage;
    agentManager: Pick<AgentManager, "listAgents" | "listImportablePersistedAgents">;
    agentStorage: Pick<AgentStorage, "list">;
    providerSnapshotManager: Pick<ProviderSnapshotManager, "getProviderLabel">;
}
export interface ListImportableProviderSessionsResult {
    entries: RecentProviderSessionDescriptorPayload[];
    filteredAlreadyImportedCount: number;
}
export interface ImportProviderSessionInput {
    request: NormalizedImportAgentRequest;
    agentManager: AgentManager;
    agentStorage: AgentStorage;
    workspaceGitService?: Pick<WorkspaceGitService, "resolveRepoRoot">;
    providerSnapshotManager?: Pick<ProviderSnapshotManager, "listProviders">;
    daemonConfig?: StructuredGenerationDaemonConfig | null;
    paseoHome?: string;
    logger: Logger;
    deps?: {
        scheduleAgentMetadataGeneration?: typeof scheduleAgentMetadataGeneration;
    };
}
export interface ImportProviderSessionResult {
    snapshot: ManagedAgent;
    timelineSize: number;
}
export declare function normalizeImportAgentRequest(msg: ImportAgentRequestMessage): NormalizedImportAgentRequest | {
    error: string;
};
export declare function listImportableProviderSessions(input: ListImportableProviderSessionsInput): Promise<ListImportableProviderSessionsResult>;
export declare function importProviderSession(input: ImportProviderSessionInput): Promise<ImportProviderSessionResult>;
export {};
//# sourceMappingURL=import-sessions.d.ts.map