# AccessLens 4.0A + 4.0B — India-first Application Agent Foundation

This is a **working local prototype**, not an autonomous mass-applying agent.

## What is included
- Existing AccessLens 3F.2 job search, resume preparation, AI workspace, tracker and optional extension.
- `profile.html`: reusable candidate profile and approved screening answers; stored in browser localStorage, exportable to JSON.
- `queue.html`: add job listings to a queue, record statuses, export queue to JSON; saved in browser localStorage.
- `portal_adapters.py`: conservative site classifications. Greenhouse and Lever: experimental browser assistance. Naukri, LinkedIn, Foundit, Instahyre, Cutshort, Indeed, Hirist, Wellfound, iimjobs, Shine, TimesJobs and Workday: candidate-controlled handoff only. Other sites: manual inspection.
- `agent.py`: optional local Playwright helper that opens **HTTPS Greenhouse/Lever** job pages and can fill a small set of unambiguous, empty text fields and attach a resume when exactly one upload field exists. It never clicks Submit. It doesn't log in, evade CAPTCHAs or MFA, or apply in bulk.

## Install

Unzip to `~/Desktop/accesslens-4a`, then:

```bash
cd ~/Desktop/accesslens-4a
python3 -m pip install pypdf python-docx
export JSEARCH_API_KEY="YOUR_KEY"
export OPENAI_API_KEY="YOUR_KEY"
python3 server.py
```

Open `http://127.0.0.1:8780/jobs.html?v=4a` then choose **Candidate profile** and **Application queue**. Stop the older server first.

## Optional Playwright helper

```bash
python3 -m pip install playwright
python3 -m playwright install chromium
python3 agent.py --url 'https://jobs.lever.co/EXAMPLE/EXAMPLE' --profile ~/Downloads/accesslens-candidate-profile.json
# Add --fill only when you want the assistant to fill recognized fields:
python3 agent.py --url 'https://jobs.lever.co/EXAMPLE/EXAMPLE' --profile ~/Downloads/accesslens-candidate-profile.json --fill --resume ~/Downloads/approved-resume.pdf
```

The example URL is **not a real job**; use a genuine URL from your queue. Confirm the employer URL and form before running. Your profile file contains personal information; keep it private. A browser launched by this script is separate from your normal Chrome session. Employer form implementations change and some won't be supported. Never enter passwords or identification details in profile JSON.

## Limitations / next build

This release does **not** automatically discover all listings across Indian portals, submit applications, upload resumes across every portal, or verify employer confirmations. JSearch coverage remains partial. Portal support is explicitly conservative. The next release can add a dedicated browser-worker service, job-level approval screen, supported ATS adapters, and confirmation capture after testing on permitted live forms. Candidate data is currently stored in browser localStorage; production requires secure authentication and encrypted storage.
