# AccessLens 4.0D — Universal Employer Form Agent (experimental)

This is an incremental local prototype, not a general autonomous job-application system.

## Changes
- Queue launches the agent for **public HTTPS employer websites**, not only Greenhouse/Lever.
- DOM-based semantic matching for candidate details and reusable **candidate-approved** screening answers (from Profile, `Question = Answer`).
- Agent reads back filled text fields, reports **verified** or **needs input/review**, and audits HTML `required` controls.
- Resume upload attempts only when exactly one file control is found.
- LinkedIn, Naukri, Foundit, Instahyre, Cutshort, Indeed, Hirist, Wellfound, iimjobs, Shine, TimesJobs, Workday and similar job portals are **manual handoff**. This is not an integration with those portals.
- No automatic submission, login, CAPTCHA/MFA handling, browser fingerprint evasion, or mass applications.

## Run
```bash
cd ~/Desktop/accesslens-4d
python3 -m pip install pypdf python-docx playwright
python3 -m playwright install chromium
python3 server.py
```
Open http://127.0.0.1:8780/jobs.html?v=4d then Candidate profile and Application queue.

**Security and accuracy**: Use locally only. Never expose port 8780 to the internet. Only open trusted employer URLs. An HTTPS host may still be malicious; the agent does not certify authenticity. The verification report checks form values against your supplied profile, not factual truth or employer acceptance. Dynamic, embedded, multi-step and select/radio fields are not fully supported. Do not treat `verified` as confirmation of a submitted application. You must inspect the browser and confirm submission yourself. Playwright browser session is separate from Chrome logins.

## Test checklist
1. Save candidate name, email, and approved answers in Candidate profile.
2. Queue a direct company HTTPS application URL, verify it belongs to the employer.
3. Select approved PDF/DOCX resume and launch the agent.
4. Check `Verified` and `Needs attention` counts against the real form; no submission is made.
5. Verify manual handoff for LinkedIn/Naukri URLs.
