import { type ProductEvidence, type Ranking, type SelectionConfig } from "./fastmoss-opportunity.js"; export type SelectionSession = { id: string; config: SelectionConfig; createdAt: string; updatedAt: string; phase: "collecting" | "reviewing" | "complete" | "interrupted"; active: boolean; completedRankings: Ranking[]; rankingErrors: Partial>; products: ProductEvidence[]; error?: string; }; export type SelectionAdapter = { discover: (ranking: Ranking, config: SelectionConfig, save: (products: ProductEvidence[]) => Promise) => Promise; detail: (product: ProductEvidence, config: SelectionConfig, save: (product: ProductEvidence) => Promise) => Promise; }; export declare class FastMossSelectionSessions { private directory; private adapter; private activeId; private task; private serial; constructor(directory: string, adapter: SelectionAdapter); isRunning(): boolean; private atomic; private persist; private load; get(id?: string): Promise<{ candidates: { source: string; sourceProductId: string; platformProductId: string; title: string; market: string; category: string; storeName: string; productUrl: string; imageUrls: string[]; metrics: { strategy: "fastmoss-evidence-v2"; selectionSessionId: string; selectionDecision: "test" | "watch" | "skip"; selectionEligible: boolean; portfolioSelected: boolean; selectionReasons: string[]; selectionRisks: string[]; sales: number | null; growthPercent: number | null; price: number | null; currency: string | null; captureDate: string; sourceVerified: boolean; opportunityAssessment: import("./fastmoss-opportunity.js").Assessment; opportunityEvidence: ProductEvidence; }; }[]; id: string; config: SelectionConfig; createdAt: string; updatedAt: string; phase: "collecting" | "reviewing" | "complete" | "interrupted"; active: boolean; completedRankings: Ranking[]; rankingErrors: Partial>; products: ProductEvidence[]; error?: string; } | null>; /** Serialize ACK creation; repeat POST with the same id never starts duplicate work. */ start(id: string, input: Partial, resume?: boolean): Promise<{ candidates: { source: string; sourceProductId: string; platformProductId: string; title: string; market: string; category: string; storeName: string; productUrl: string; imageUrls: string[]; metrics: { strategy: "fastmoss-evidence-v2"; selectionSessionId: string; selectionDecision: "test" | "watch" | "skip"; selectionEligible: boolean; portfolioSelected: boolean; selectionReasons: string[]; selectionRisks: string[]; sales: number | null; growthPercent: number | null; price: number | null; currency: string | null; captureDate: string; sourceVerified: boolean; opportunityAssessment: import("./fastmoss-opportunity.js").Assessment; opportunityEvidence: ProductEvidence; }; }[]; id: string; config: SelectionConfig; createdAt: string; updatedAt: string; phase: "collecting" | "reviewing" | "complete" | "interrupted"; active: boolean; completedRankings: Ranking[]; rankingErrors: Partial>; products: ProductEvidence[]; error?: string; } | null>; waitUntilIdle(): Promise; private run; }