Skip to content

agent: add adapter for 58.com - #2649

Open
alectimison-maker wants to merge 3 commits into
webbrain-one:mainfrom
alectimison-maker:agent/58-com-adapter
Open

agent: add adapter for 58.com#2649
alectimison-maker wants to merge 3 commits into
webbrain-one:mainfrom
alectimison-maker:agent/58-com-adapter

Conversation

@alectimison-maker

Copy link
Copy Markdown
Contributor

Summary

Adds a mirrored 58.com / 58同城 adapter for Chrome and Firefox.

Without this adapter, the agent can silently use a geolocated city, assume every category has the same filters, treat paid or user-posted information as verified, or mistake opening a publish/delete flow for completion.

  • Cover city, listing, login, account, publish, help, support, and anti-bot surfaces while excluding corporate, download, static, and advertising subdomains.
  • Distinguish recruitment, property, vehicle, second-hand marketplace, and local-service workflows.
  • Verify city, price units, location, poster identity, category-specific facts, and verification/advertising labels.
  • Separate read-only listing research from contact, job application, resume delivery, booking, publishing, editing, deletion, and promotion actions.
  • Preserve evidence and keep payment/contact inside a visibly supported platform path.
  • Fail closed on SMS, captcha, and frequency-verification redirects.
  • Add host-scope, lookalike-host, category-label, action-boundary, completion-state, and Chrome/Firefox parity tests.

Validation

  • Test-first adapter assertion: failed before implementation, then passed.
  • Targeted 58.com production and guidance assertions: passed.
  • Anonymous Chrome/Playwright read-only checks:
    • www.58.com returned HTTP 200 and redirected to the geolocated cs.58.com city page.
    • Recruitment and rental list requests returned HTTP 200 before redirecting to callback.58.com/antibot/verifycode with the 请输入验证码 title.
    • post.58.com/2/ returned HTTP 200 with the 免费发布信息 category page.
    • Every final URL selected the 58-com adapter.
  • node test/run.js: 1404/1405 passed; the single failure predates this branch (package.json 26.0.4 versus CHANGELOG.md 26.0.0).
  • node test/security/injection-corpus.mjs: 60/60 passed.
  • git diff --check: passed.

Compatibility and risks

Prompt-only and mirrored across browser builds. Authenticated contact, application, publishing, editing, deletion, and payment paths were not exercised; each is guarded by explicit authorization and observable completion-state guidance. No login, contact, application, publish, delete, verification, or payment action was performed.

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

@alectimison-maker is attempting to deploy a commit to the esokullu's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds mirrored 58.com adapter guidance for safe classifieds workflows.

Changes:

  • Adds Chrome and Firefox adapter matching and safety guidance.
  • Adds host-scope, guidance, and parity tests.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/chrome/src/agent/adapters.js Adds the Chrome 58.com adapter.
src/firefox/src/agent/adapters.js Mirrors the adapter for Firefox.
test/run.js Tests host matching, guidance, and parity.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/chrome/src/agent/adapters.js Outdated
- The platform's own agreement says listing information is user-published and transactions require independent judgment. Preserve the listing URL, screenshots, chat, receipts, and other evidence; do not send deposits, recruitment fees, verification codes, ID scans, or payment through seller-supplied external links. Use an on-platform protected-payment path only when the exact listing visibly offers it and review the full payable total.
- "免费发布信息" opens post.58.com/2/ and first asks for a precise category. Before the final publish action, review city, category, title, facts, price, contact visibility, images, and any fees with the user; publishing, editing, deleting, promoting, or refreshing a listing each requires explicit authorization.
- Report a post as complete only after "我的发布" shows the new listing and its actual status or public URL. "修改/删除信息" can route to help.58.com and offer account login or "手机短信删除"; do not claim deletion from opening that help page or submitting a verification request.
- Login can require SMS/captcha. Rapid list access may redirect an initial HTTP 200 response to callback.58.com/antibot/verifycode with "访问过于频繁", "请在五分钟内完成验证", and "点击按钮进行验证". Stop for the user and do not retry or bypass it; the wall is not evidence that no listings exist.
Comment thread src/firefox/src/agent/adapters.js Outdated
- The platform's own agreement says listing information is user-published and transactions require independent judgment. Preserve the listing URL, screenshots, chat, receipts, and other evidence; do not send deposits, recruitment fees, verification codes, ID scans, or payment through seller-supplied external links. Use an on-platform protected-payment path only when the exact listing visibly offers it and review the full payable total.
- "免费发布信息" opens post.58.com/2/ and first asks for a precise category. Before the final publish action, review city, category, title, facts, price, contact visibility, images, and any fees with the user; publishing, editing, deleting, promoting, or refreshing a listing each requires explicit authorization.
- Report a post as complete only after "我的发布" shows the new listing and its actual status or public URL. "修改/删除信息" can route to help.58.com and offer account login or "手机短信删除"; do not claim deletion from opening that help page or submitting a verification request.
- Login can require SMS/captcha. Rapid list access may redirect an initial HTTP 200 response to callback.58.com/antibot/verifycode with "访问过于频繁", "请在五分钟内完成验证", and "点击按钮进行验证". Stop for the user and do not retry or bypass it; the wall is not evidence that no listings exist.
Comment thread test/run.js
assert.match(adapter?.notes || '', /publishing.*editing.*deleting.*promoting.*refreshing.*explicit authorization/s);
assert.match(adapter?.notes || '', /我的发布.*actual status or public URL/s);
assert.match(adapter?.notes || '', /修改\/删除信息.*help\.58\.com.*手机短信删除/s);
assert.match(adapter?.notes || '', /HTTP 200.*callback\.58\.com\/antibot\/verifycode.*访问过于频繁.*请在五分钟内完成验证.*点击按钮进行验证/s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants