Commit Graph

206 Commits

Author SHA1 Message Date
f586c6d091 Decouple form filler from LinkedIn modal selector
Form filler now defaults to page root instead of scoping to
[role="dialog"]. LinkedIn Easy Apply passes its modal selector
explicitly. Fixes external ATS forms being scoped to wrong
container. Also improved Greenhouse handler with targeted
resume upload and form detection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:58:51 -08:00
a17886e58b Fix Ashby resume upload and add validation error logging
Ashby wraps file input inside #_systemfield_resume container — search
for the actual input[type="file"] element. Also capture and log
validation errors from the page when submit returns incomplete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:47:15 -08:00
ae797d73eb Refactor apply handlers: generic with extensions + domain auto-routing
Generic handler now accepts options (transformUrl, formDetector,
submitSelector, resumeSelector, beforeSubmit, verifySelector, etc.).
Each ATS handler passes its overrides instead of reimplementing.

Registry resolves handlers by: apply_type -> URL domain -> generic fallback.
New ATS handlers only need to export SUPPORTED_TYPES and an apply() that
calls genericApply with platform-specific options.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:41:54 -08:00
4f202a4e91 Build dedicated Ashby handler instead of generic delegation
Handles Ashby-specific quirks:
- Auto-appends /application to job URLs
- Targets #_systemfield_resume for resume upload (not autofill input)
- Clicks "Submit Application" specifically, avoiding "Upload file" buttons
- Checks for Ashby-specific form fields to verify submission

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:39:24 -08:00
6492444a3e Use job queue metadata instead of scraping page for title/company
Page scraping was grabbing wrong elements (e.g. "Location" instead of
company name on Ashby). Queue already has correct metadata.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:37:31 -08:00
630996f643 Use DEFAULT_MODEL constant for Anthropic API calls
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:36:44 -08:00
e1a4ccf7a0 Fix model ID to use full claude-sonnet-4-6-20251101
Short alias was returning 404 from Anthropic API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:35:27 -08:00
a4f84cd4c3 Skip social media fields (Twitter, GitHub, etc.) in form filler
Return empty string to leave them blank without triggering needs_answer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:32:30 -08:00
f85c4295eb Disable unknown_external in applier for now, keep ashby only
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:23:32 -08:00
b19cb68370 Skip already-visited unknown_external jobs in classifier
Only classify jobs without an apply_url — those with one have already
been visited and don't need re-classification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:22:08 -08:00
73c23d9bf1 Improve generic applier: better closed/404 detection and submit selectors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:20:24 -08:00
298d01ae44 Only enable ATS types that work with generic applier
Ashby and unknown_external work. Greenhouse, Lever, Jobvite have
visible CAPTCHAs. Workday requires login. Keep those disabled until
proper handlers are built.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:15:47 -08:00
1772229ae7 Fix CAPTCHA detection to allow invisible reCAPTCHA
Invisible reCAPTCHA (size=invisible) fires on submit and usually passes
automatically. Only block on visible CAPTCHA challenges. Also fix form
detection to work without <form> wrapper elements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:08:44 -08:00
260f996ebc Add generic external ATS applier
Best-effort form filler for any career page with standard HTML forms.
Handles single-page and multi-step flows, resume upload, login wall
and CAPTCHA detection. All ATS stub handlers now delegate to generic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:02:55 -08:00
b19c1ee77e Add ATS patterns for grnh.se, myworkdaysite, eightfold, comeet, gem, adp, dayforcehcm
Reclassifies 58 more unknown_external jobs using URLs already in queue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:58:47 -08:00
73887318b2 Fix saveQueue() called without argument in job_filter.mjs
Iterate over the full queue array instead of getJobsByStatus() results,
and pass it to saveQueue(). The previous code passed no argument, which
would corrupt or silently fail the save.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:50:27 -08:00
273a32e571 Add sidecar update pattern to prevent concurrent queue writes
Secondary processes (standalone classifier, ad-hoc scripts) now write
to queue_updates.jsonl via writePendingUpdate() instead of modifying
jobs_queue.json directly. Primary processes pick up updates on next
loadQueue() call using atomic rename-then-read.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:46:36 -08:00
de92ba85c7 Add more ATS patterns for external job classification
Adds applytojob.com (Jobvite), trakstar, resumator, breezy, jazz,
recruitee, applicantpro, paylocity, paycom, ultipro, successfactors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:56:53 -08:00
c33fb2ba0d Fix classifyExternalJobs to extract URL from redirect link
External Apply buttons are <a> tags with LinkedIn redirect URLs, not
<button> elements. Extract the real URL from the redirect's query
parameter instead of clicking and waiting for a new tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:51:38 -08:00
90894301c1 Fix Telegram rendering — no leading spaces on breakdown lines
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:36:27 -08:00
0922489c6c Show per-type breakdown under Ready to apply in status
Replaces flat "Breakdown: ..." line with indented sub-items showing
Easy Apply, Wellfound, Greenhouse etc. counts under Ready to apply.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:36:02 -08:00
3a02c40b02 Move RATE_LIMIT_COOLDOWN_MS to constants file
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:16:14 -08:00
bbe68942e1 Exclude rate-limited platforms from job selection
When LinkedIn is rate-limited, its jobs were filling the maxApps quota
but then getting skipped, leaving 0 applied. Now excludes easy_apply
jobs from selection during cooldown so Wellfound jobs get picked up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:15:29 -08:00
69eb6b124f Classify unknown_external jobs by following Apply redirects
After LinkedIn search completes, visits each unknown_external job page,
clicks the Apply button, captures the redirect URL, and matches against
known ATS patterns to identify the actual application platform.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:13:32 -08:00
cc0d15ece7 6-hour cooldown after LinkedIn Easy Apply daily limit
When rate limited, writes timestamp to data/linkedin_rate_limited_at.json.
Subsequent runs skip LinkedIn until 6 hours have passed. Other platforms
(Wellfound) continue unaffected. Cooldown file auto-deleted on expiry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:02:24 -08:00
dfe6810acc Add direct URL rate limit text to detection
LinkedIn shows different text on direct /apply/ URL vs button click:
- Button: "Easy Apply limit"
- Direct URL: "limit daily submissions" / "apply tomorrow"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:58:37 -08:00
374b2e6640 Rate limit only stops LinkedIn, continues other platforms
Don't break the entire run when LinkedIn rate limits — skip LinkedIn
jobs and continue to Wellfound and other platforms.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:55:02 -08:00
331408be41 Detect LinkedIn Easy Apply daily limit and stop run
When LinkedIn shows "Easy Apply limit" message, detect it in the
modal-open check, return rate_limited status, put job back in queue,
send Telegram alert, and stop the entire run. Prevents burning retries
and wasting browser sessions when rate limited.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:54:45 -08:00
814492d9b6 Skip file upload when input only accepts images, not PDF/DOC
Some LinkedIn listings have image-only upload fields (JPG/PNG).
Don't attempt to upload a PDF resume to these inputs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:41:34 -08:00
6a1423eab6 Silence stdout when status sends via Telegram directly
Match applier behavior — sendTelegram() only, no stdout relay.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:54:41 -08:00
1a1af5934a Fix status: send via Telegram directly, short ack to stdout
Prevents OpenClaw from relaying full report as plain-text duplicate.
sendTelegram() handles formatted delivery, stdout just says "sent".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:51:30 -08:00
38dabbd6dd Fix address hallucination and duplicate status messages
- answerFor returning '' (intentionally blank) was treated as falsy,
  falling through to AI which fabricated "123 Main Street". Now
  empty string skips the field without triggering AI or reporting unknown.
- status.mjs was printing to stdout AND sending via Telegram, causing
  OpenClaw to relay a duplicate plain-text copy. Now only prints to
  stdout when Telegram isn't configured.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:47:18 -08:00
84a98e7839 Treat number fields as required even if DOM doesn't mark them
LinkedIn validates number fields even when not marked required in the
DOM. Previously these were skipped (no AI call, no answer). Now number
fields always trigger AI fallback and are reported as unknown if empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:43:39 -08:00
a629291722 Auto-clear stale batch markers in filter before submitting
When a batch completes but scores aren't written back (collection
error), jobs get stuck with filter_batch_id set and never re-submitted.
Now checks: if no filter_state.json exists (no batch in flight) but
jobs have batch markers without scores, clear them so they get
re-submitted on the next run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:41:08 -08:00
8cdafcae4a Send status report directly via Telegram for proper markdown rendering
Previously status.mjs relied on OpenClaw relaying stdout, which sent
as plain text. Now sends via sendTelegram() directly when Telegram
config is present, matching how all other scripts send notifications.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:38:33 -08:00
aefd1f2023 Fix label dedup for space-separated duplicates
LinkedIn renders label text twice in nested spans, producing
"Question? Question?" instead of "Question?". The old dedup only
caught exact concatenation (ABCABC); now also handles space-separated
duplicates by comparing left/right halves at the midpoint space.

Applied to all 4 copies: extractLabel, _extractLabel, normalizeLegend,
_normalizeLegend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:28:51 -08:00
05739a455b Fix AI hallucinating street addresses and other facts
- Add street/address pattern to answerFor() — returns profile address or empty string
- Update AI prompt: return "UNKNOWN" instead of guessing facts
- Handle UNKNOWN response by treating it as no answer (triggers Telegram ask)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:25:32 -08:00
fd30646d8a Fix number field validation: strip text from numeric answers
Number inputs (type="number") were getting answers like "5 years"
instead of "5", causing LinkedIn validation errors. Now:
- AI gets "(must be a number, no text or units)" hint
- Answers are stripped to digits before filling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:21:37 -08:00
9a0d13c920 Bump to 0.1.5
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:10:00 -08:00
6e0f212515 Add GitHub link to top of SKILL.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:09:40 -08:00
f248e8573f Auto-create claw-apply proxy if it doesn't exist
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:06:47 -08:00
df9c790a0e Look up proxy by name 'claw-apply' instead of stored ID
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:06:14 -08:00
80d2323a37 Dynamic profile lookup from auth connection
Profile name is returned by ensureAuth() from the auth connection
(looked up by domain). No more storing profile names in settings.json
for the applier flow. createBrowser() still supports legacy platform
keys as fallback for searcher/setup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:02:19 -08:00
0e18bbf481 Update docs: domain-based auth lookup, no connection IDs needed
Connection IDs are no longer stored in settings.json. The applier
finds auth connections by domain (linkedin.com, wellfound.com) at
runtime via the Kernel SDK. Updated SKILL.md, README.md, and bumped
to 0.1.4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:57:55 -08:00
668a40a51a Look up auth connections by domain instead of stored ID
Connection IDs change when re-authing. Instead of storing IDs in
settings.json (which go stale), look up connections by domain at
runtime via kernel.auth.connections.list({ domain }). This keeps
the applier in sync regardless of connection recreation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:55:26 -08:00
561e666323 Document LinkedIn rate limit and 1-job-per-run pacing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:49:35 -08:00
59e410b9c4 Add auth health check before browser creation
- Rewrite session.mjs: check connection status via SDK before creating
  browser. If NEEDS_AUTH + can_reauth, auto re-auth with stored creds.
  If can't re-auth, send Telegram alert and skip platform.
- Wire ensureAuth() into job_applier.mjs before createBrowser()
- Jobs are returned to queue (not failed) when auth is down

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:45:24 -08:00
a133202e1b Bump to 0.1.3
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:27:17 -08:00
82db9658c2 Add security note to SKILL.md addressing prompt-injection false positive
The ClawHub scanner flags systemPrompt variables in lib/*.mjs as
potential prompt injection. These are legitimate Claude API prompts
for job scoring, answer generation, and keyword generation. Added
explicit note clarifying their purpose.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:26:47 -08:00
c767c7e30e Bump version to 0.1.2 for ClawHub republish
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:25:03 -08:00