Skip to content

Commit 0329858

Browse files
authored
Merge pull request #2618 from alectimison-maker/agent/coupang-adapter
agent: add adapter for Coupang
2 parents e3c729a + 41fcf63 commit 0329858

3 files changed

Lines changed: 66 additions & 0 deletions

File tree

src/chrome/src/agent/adapters.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16309,6 +16309,20 @@ const ADAPTERS = [
1630916309
- 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 manually — do not retry, bypass, or claim results were read.`,
1631016310
},
1631116311

16312+
// ─── Regional — Coupang (Korea) ──────────────────────────────────────
16313+
{
16314+
name: 'coupang',
16315+
category: 'general',
16316+
matches: (url) => /^https?:\/\/(?:(?:www|m|cart)\.)?coupang\.com\//.test(url),
16317+
notes: `
16318+
- As of 2026-07, background requests can return an Akamai Access Denied page even when the shopping page works in the active tab. If fetch_url or research_url is blocked, switch immediately to read_page, the accessibility tree, and DOM tools; do not retry the same URL.
16319+
- Coupang is a Korean MARKETPLACE. Stable labels: "장바구니 담기" = add to cart, "바로구매" = buy now, "장바구니" = cart, and "판매자" = seller. "바로구매" skips the cart, so do not click it when the task is only to collect or compare items.
16320+
- Search defaults to "쿠팡 랭킹순", and sponsored products are marked "AD". For a price comparison choose "낮은가격순" and enable "배송비 포함"; do not present the default ranking or an ad position as the cheapest result.
16321+
- Product pages may group pack count, size, color, or other variants behind "모든 옵션 보기". Select the exact option first and compare the displayed unit price (for example, 100g당), not only the bundle total.
16322+
- The same product can be fulfilled by different sellers. Read "판매자", seller rating, delivery fee, and arrival date for the selected offer; product reviews may be pooled across different sellers and are not evidence about that seller.
16323+
- "로켓배송" describes Coupang-fulfilled delivery, while "와우" free shipping, free returns, or dawn delivery are membership-conditional. Confirm the selected offer and the cart total before promising delivery, savings, or a final price.`,
16324+
},
16325+
1631216326
// ─── Regional — Rakuten Ichiba (Japan) ────────────────────────────────
1631316327
{
1631416328
name: 'rakuten-ichiba',

src/firefox/src/agent/adapters.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16307,6 +16307,20 @@ const ADAPTERS = [
1630716307
- 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 manually — do not retry, bypass, or claim results were read.`,
1630816308
},
1630916309

16310+
// ─── Regional — Coupang (Korea) ──────────────────────────────────────
16311+
{
16312+
name: 'coupang',
16313+
category: 'general',
16314+
matches: (url) => /^https?:\/\/(?:(?:www|m|cart)\.)?coupang\.com\//.test(url),
16315+
notes: `
16316+
- As of 2026-07, background requests can return an Akamai Access Denied page even when the shopping page works in the active tab. If fetch_url or research_url is blocked, switch immediately to read_page, the accessibility tree, and DOM tools; do not retry the same URL.
16317+
- Coupang is a Korean MARKETPLACE. Stable labels: "장바구니 담기" = add to cart, "바로구매" = buy now, "장바구니" = cart, and "판매자" = seller. "바로구매" skips the cart, so do not click it when the task is only to collect or compare items.
16318+
- Search defaults to "쿠팡 랭킹순", and sponsored products are marked "AD". For a price comparison choose "낮은가격순" and enable "배송비 포함"; do not present the default ranking or an ad position as the cheapest result.
16319+
- Product pages may group pack count, size, color, or other variants behind "모든 옵션 보기". Select the exact option first and compare the displayed unit price (for example, 100g당), not only the bundle total.
16320+
- The same product can be fulfilled by different sellers. Read "판매자", seller rating, delivery fee, and arrival date for the selected offer; product reviews may be pooled across different sellers and are not evidence about that seller.
16321+
- "로켓배송" describes Coupang-fulfilled delivery, while "와우" free shipping, free returns, or dawn delivery are membership-conditional. Confirm the selected offer and the cart total before promising delivery, savings, or a final price.`,
16322+
},
16323+
1631016324
// ─── Regional — Rakuten Ichiba (Japan) ────────────────────────────────
1631116325
{
1631216326
name: 'rakuten-ichiba',

test/run.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,6 +2489,44 @@ test('matches Mercado Libre LATAM storefronts and includes marketplace guidance'
24892489
assert.equal(firefoxAdapter?.notes, adapter?.notes);
24902490
});
24912491

2492+
test('matches Coupang shopping surfaces and includes Korean marketplace guidance', () => {
2493+
const trustedUrls = [
2494+
'https://coupang.com/',
2495+
'https://www.coupang.com/np/search?q=bodywash',
2496+
'https://m.coupang.com/vm/products/40994378',
2497+
'https://cart.coupang.com/cartView.pang',
2498+
];
2499+
for (const url of trustedUrls) {
2500+
assert.equal(getActiveAdapter(url)?.name, 'coupang');
2501+
assert.equal(getActiveAdapterFx(url)?.name, 'coupang');
2502+
}
2503+
2504+
const rejectedUrls = [
2505+
'https://wing.coupang.com/',
2506+
'https://www.tw.coupang.com/',
2507+
'https://coupang.com.phishing.example/vp/products/40994378',
2508+
'https://example.com/coupang.com/vp/products/40994378',
2509+
];
2510+
for (const url of rejectedUrls) {
2511+
assert.notEqual(getActiveAdapter(url)?.name, 'coupang');
2512+
assert.notEqual(getActiveAdapterFx(url)?.name, 'coupang');
2513+
}
2514+
2515+
const adapter = getActiveAdapter('https://www.coupang.com/vp/products/40994378');
2516+
const firefoxAdapter = getActiveAdapterFx('https://cart.coupang.com/');
2517+
assert.match(adapter?.notes || '', /2026-07/);
2518+
assert.match(adapter?.notes || '', /Akamai Access Denied/);
2519+
assert.match(adapter?.notes || '', /배송비 포함/);
2520+
assert.match(adapter?.notes || '', /낮은가격순/);
2521+
assert.match(adapter?.notes || '', /판매자/);
2522+
assert.match(adapter?.notes || '', /different sellers/i);
2523+
assert.match(adapter?.notes || '', /로켓배송/);
2524+
assert.match(adapter?.notes || '', /와우/);
2525+
assert.match(adapter?.notes || '', /장바구니 담기/);
2526+
assert.match(adapter?.notes || '', /바로구매/);
2527+
assert.equal(firefoxAdapter?.notes, adapter?.notes);
2528+
});
2529+
24922530
test('matches Rakuten Ichiba shopping surfaces and includes marketplace guidance', () => {
24932531
const trustedUrls = [
24942532
'https://www.rakuten.co.jp/',

0 commit comments

Comments
 (0)