/** * gemini-agent.ts — AI-powered form navigator for cv jobs apply * * Uses Gemini Vision to: * 1. Screenshot the current browser page * 2. Send screenshot + resume context to Gemini * 3. Get back structured actions (fill field, click button, etc.) * 4. Execute those actions via Playwright * 5. Prompt user via CLI when info is missing * 6. Store new user info to ~/.careervivid/apply-profile.json for reuse * * This replaces brittle CSS-selector scraping with intent-driven AI navigation. */ import type { Page } from "playwright-core"; export interface ApplyProfile { firstName?: string; lastName?: string; email?: string; phone?: string; linkedin?: string; github?: string; portfolio?: string; location?: string; city?: string; state?: string; country?: string; workAuthorization?: string; yearsOfExperience?: string; currentTitle?: string; currentCompany?: string; salaryExpectation?: string; pronouns?: string; gender?: string; ethnicity?: string; veteranStatus?: string; disabilityStatus?: string; [key: string]: string | undefined; } export declare function loadProfile(): ApplyProfile; export declare function saveProfile(profile: ApplyProfile): void; export interface GeminiAction { type: "fill" | "click" | "select" | "check" | "upload" | "scroll" | "wait" | "done" | "ask_user"; /** CSS selector or descriptive label */ selector?: string; /** Text description of the element (used for fallback matching) */ description?: string; /** Value to fill/select */ value?: string; /** When type=ask_user: the question to ask the user */ question?: string; /** When type=ask_user: the profile key to store the answer under */ profileKey?: string; /** Human-readable explanation of this action */ reason?: string; } export interface GeminiAgentResult { fieldsFound: number; fieldsFilled: number; userPrompts: number; done: boolean; } export declare class GeminiFormAgent { private ai; private profile; private resumeContext; private jobContext; private maxRounds; constructor(opts: { apiKey: string; profile: ApplyProfile; resumeData: Record; jobTitle: string; company: string; jobDescription?: string; }); /** * Run the agentic loop: * Take screenshot → ask Gemini → execute actions → repeat until done/max rounds */ run(page: Page): Promise; private askGemini; private executeAction; private askUser; } //# sourceMappingURL=gemini-agent.d.ts.map