Skip to content

Commit f3d36f6

Browse files
esokulluclaude
andcommitted
agent: tighten Mercado Libre adapter notes
- replace blended ES/PT labels ("Agregar/Adicionar ao carrito", "Comprar ahora/agora") with per-locale label lists; those strings match no control on either storefront and contradicted the don't-mix-locales rule in the first bullet - distinguish catalog pages (/p/MLA…, /p/MLM…, /p/MLB…), which carry the multi-seller offer list, from single-seller -_JM listings, which do not - warn that checkout continues on a Mercado Pago host where the adapter no longer fires, so the final total must be confirmed there - date the volatile UI labels per CONTRIBUTING.md - lock both fixes with test assertions Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent ce9a0db commit f3d36f6

3 files changed

Lines changed: 16 additions & 12 deletions

File tree

src/chrome/src/agent/adapters.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16287,12 +16287,12 @@ const ADAPTERS = [
1628716287
category: 'general',
1628816288
matches: (url) => /^https?:\/\/(?:[a-z0-9-]+\.)*(?:mercadolibre\.com\.(?:ar|mx)|mercadolivre\.com\.br)\//.test(url),
1628916289
notes: `
16290-
- Mercado Libre/Livre is a multi-seller MARKETPLACE with localized UI. Argentina/Mexico use Spanish labels such as "Comprar ahora", "Agregar al carrito", and "Otras opciones de compra"; Brazil uses "Comprar agora", "Adicionar ao carrinho", and "Outras opções de compra". Follow the labels for the current country — do not mix the Spanish and Portuguese flows.
16291-
- Catalog product pages can group the same product from many sellers. The main buy box represents ONE seller/offer, while "Otras opciones de compra"/"Outras opções de compra" may have a different price, seller reputation, shipping cost, or arrival date. Compare the active offer before quoting or adding it.
16292-
- Variant trap: choose required color, size ("talle"/"talla"/"tamanho"), capacity, voltage, flavor, or other variation BEFORE adding. A variation can change stock, seller, price, and delivery; read back the selected variation from the product page or cart.
16293-
- LOCATION-FIRST shipping: set the destination postal code ("código postal" in AR/MX, "CEP" in BR) before promising availability, freight, free shipping, pickup, or an arrival date. Re-check these in the cart because they depend on both destination and seller.
16294-
- Displayed discounts and installment amounts ("cuotas"/"parcelas") may depend on the payment method, and the listing price can exclude shipping. Use "Agregar/Adicionar ao carrito" when choices still need review; verify seller, variations, quantity, shipping, and the final payable total before any consequential "Comprar ahora/agora" action.
16295-
- Search/result hosts such as listado.mercadolibre.com.ar, listado.mercadolibre.com.mx, and lista.mercadolivre.com.br may redirect automation to /gz/account-verification. If that verification wall appears, STOP and ask the user to complete it manually; do not retry, bypass it, or claim that results were inspected.`,
16290+
- Multi-seller MARKETPLACE, localized per country. As of 2026-07 — AR/MX (Spanish): "Comprar ahora", "Agregar al carrito", "Otras opciones de compra". BR (Portuguese): "Comprar agora", "Adicionar ao carrinho", "Outras opções de compra". Use the current site's language only; a blended label matches no control on either storefront.
16291+
- Catalog pages (path contains /p/MLA…, /p/MLM…, /p/MLB…) group MANY sellers under one product: the buy box is ONE seller's offer, and the "otras opciones"/"outras opções" list holds others at a different price, shipping cost, and reputation — compare before quoting. Single-seller listings (articulo.mercadolibre.com.*/…-_JM, produto.mercadolivre.com.br/…-_JM) have no such list; don't hunt for it there.
16292+
- Variant trap: pick every required option — color, size ("talle" AR / "talla" MX / "tamanho" BR), capacity, voltage, flavorBEFORE adding. A variation can change stock, price, seller, and delivery; read the selection back from the cart.
16293+
- LOCATION-FIRST: set the destination postal code ("código postal" AR/MX, "CEP" BR) before stating availability, shipping cost, free shipping, pickup, or arrival date. Re-check in the cart — these depend on destination AND seller.
16294+
- Listed prices exclude shipping, and headline discounts/installments ("cuotas" AR/MX, "parcelas" BR) can depend on payment method. Add to cart while choices are open; confirm seller, variation, quantity, shipping, and final payable total before buy-now. Checkout then continues on a Mercado Pago host, where this guidance no longer applies — confirm the total there too.
16295+
- Search hosts (listado.mercadolibre.com.ar, listado.mercadolibre.com.mx, lista.mercadolivre.com.br) can redirect automation to /gz/account-verification. If that wall appears, STOP and ask the user to complete it manuallydo not retry, bypass, or claim results were read.`,
1629616296
},
1629716297

1629816298
// ─── Regional — Türkiye (TR) ──────────────────────────────────────────

src/firefox/src/agent/adapters.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16285,12 +16285,12 @@ const ADAPTERS = [
1628516285
category: 'general',
1628616286
matches: (url) => /^https?:\/\/(?:[a-z0-9-]+\.)*(?:mercadolibre\.com\.(?:ar|mx)|mercadolivre\.com\.br)\//.test(url),
1628716287
notes: `
16288-
- Mercado Libre/Livre is a multi-seller MARKETPLACE with localized UI. Argentina/Mexico use Spanish labels such as "Comprar ahora", "Agregar al carrito", and "Otras opciones de compra"; Brazil uses "Comprar agora", "Adicionar ao carrinho", and "Outras opções de compra". Follow the labels for the current country — do not mix the Spanish and Portuguese flows.
16289-
- Catalog product pages can group the same product from many sellers. The main buy box represents ONE seller/offer, while "Otras opciones de compra"/"Outras opções de compra" may have a different price, seller reputation, shipping cost, or arrival date. Compare the active offer before quoting or adding it.
16290-
- Variant trap: choose required color, size ("talle"/"talla"/"tamanho"), capacity, voltage, flavor, or other variation BEFORE adding. A variation can change stock, seller, price, and delivery; read back the selected variation from the product page or cart.
16291-
- LOCATION-FIRST shipping: set the destination postal code ("código postal" in AR/MX, "CEP" in BR) before promising availability, freight, free shipping, pickup, or an arrival date. Re-check these in the cart because they depend on both destination and seller.
16292-
- Displayed discounts and installment amounts ("cuotas"/"parcelas") may depend on the payment method, and the listing price can exclude shipping. Use "Agregar/Adicionar ao carrito" when choices still need review; verify seller, variations, quantity, shipping, and the final payable total before any consequential "Comprar ahora/agora" action.
16293-
- Search/result hosts such as listado.mercadolibre.com.ar, listado.mercadolibre.com.mx, and lista.mercadolivre.com.br may redirect automation to /gz/account-verification. If that verification wall appears, STOP and ask the user to complete it manually; do not retry, bypass it, or claim that results were inspected.`,
16288+
- Multi-seller MARKETPLACE, localized per country. As of 2026-07 — AR/MX (Spanish): "Comprar ahora", "Agregar al carrito", "Otras opciones de compra". BR (Portuguese): "Comprar agora", "Adicionar ao carrinho", "Outras opções de compra". Use the current site's language only; a blended label matches no control on either storefront.
16289+
- Catalog pages (path contains /p/MLA…, /p/MLM…, /p/MLB…) group MANY sellers under one product: the buy box is ONE seller's offer, and the "otras opciones"/"outras opções" list holds others at a different price, shipping cost, and reputation — compare before quoting. Single-seller listings (articulo.mercadolibre.com.*/…-_JM, produto.mercadolivre.com.br/…-_JM) have no such list; don't hunt for it there.
16290+
- Variant trap: pick every required option — color, size ("talle" AR / "talla" MX / "tamanho" BR), capacity, voltage, flavorBEFORE adding. A variation can change stock, price, seller, and delivery; read the selection back from the cart.
16291+
- LOCATION-FIRST: set the destination postal code ("código postal" AR/MX, "CEP" BR) before stating availability, shipping cost, free shipping, pickup, or arrival date. Re-check in the cart — these depend on destination AND seller.
16292+
- Listed prices exclude shipping, and headline discounts/installments ("cuotas" AR/MX, "parcelas" BR) can depend on payment method. Add to cart while choices are open; confirm seller, variation, quantity, shipping, and final payable total before buy-now. Checkout then continues on a Mercado Pago host, where this guidance no longer applies — confirm the total there too.
16293+
- Search hosts (listado.mercadolibre.com.ar, listado.mercadolibre.com.mx, lista.mercadolivre.com.br) can redirect automation to /gz/account-verification. If that wall appears, STOP and ask the user to complete it manuallydo not retry, bypass, or claim results were read.`,
1629416294
},
1629516295

1629616296
// ─── Regional — Türkiye (TR) ──────────────────────────────────────────

test/run.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,6 +2424,10 @@ test('matches Mercado Libre LATAM storefronts and includes marketplace guidance'
24242424
assert.match(adapter?.notes || '', /Outras opções de compra/);
24252425
assert.match(adapter?.notes || '', /CEP/);
24262426
assert.match(adapter?.notes || '', /account-verification/);
2427+
// Checkout leaves the matched hosts, so the notes must hand the total off.
2428+
assert.match(adapter?.notes || '', /Mercado Pago/);
2429+
// Blended ES/PT labels match no real control on either storefront.
2430+
assert.doesNotMatch(adapter?.notes || '', /Agregar\/Adicionar|ahora\/agora|carrito\/carrinho/);
24272431
assert.equal(firefoxAdapter?.notes, adapter?.notes);
24282432
});
24292433

0 commit comments

Comments
 (0)