Skip to content

Commit 60e94a9

Browse files
agent: add adapter for Coupang
1 parent a696af5 commit 60e94a9

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
@@ -16294,6 +16294,20 @@ const ADAPTERS = [
1629416294
- 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.`,
1629516295
},
1629616296

16297+
// ─── Regional — Coupang (Korea) ──────────────────────────────────────
16298+
{
16299+
name: 'coupang',
16300+
category: 'general',
16301+
matches: (url) => /^https?:\/\/(?:(?:www|m|cart)\.)?coupang\.com\//.test(url),
16302+
notes: `
16303+
- 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.
16304+
- 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.
16305+
- 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.
16306+
- 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.
16307+
- 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.
16308+
- "로켓배송" 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.`,
16309+
},
16310+
1629716311
// ─── Regional — Türkiye (TR) ──────────────────────────────────────────
1629816312
// Regional adapters are the project's #1 wanted contribution (CONTRIBUTING.md);
1629916313
// Türkiye is top of the priority list. Add more TR sites (trendyol,

src/firefox/src/agent/adapters.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16292,6 +16292,20 @@ const ADAPTERS = [
1629216292
- 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.`,
1629316293
},
1629416294

16295+
// ─── Regional — Coupang (Korea) ──────────────────────────────────────
16296+
{
16297+
name: 'coupang',
16298+
category: 'general',
16299+
matches: (url) => /^https?:\/\/(?:(?:www|m|cart)\.)?coupang\.com\//.test(url),
16300+
notes: `
16301+
- 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.
16302+
- 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.
16303+
- 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.
16304+
- 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.
16305+
- 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.
16306+
- "로켓배송" 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.`,
16307+
},
16308+
1629516309
// ─── Regional — Türkiye (TR) ──────────────────────────────────────────
1629616310
// Regional adapters are the project's #1 wanted contribution (CONTRIBUTING.md);
1629716311
// Türkiye is top of the priority list. Add more TR sites (trendyol,

test/run.js

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

2456+
test('matches Coupang shopping surfaces and includes Korean marketplace guidance', () => {
2457+
const trustedUrls = [
2458+
'https://coupang.com/',
2459+
'https://www.coupang.com/np/search?q=bodywash',
2460+
'https://m.coupang.com/vm/products/40994378',
2461+
'https://cart.coupang.com/cartView.pang',
2462+
];
2463+
for (const url of trustedUrls) {
2464+
assert.equal(getActiveAdapter(url)?.name, 'coupang');
2465+
assert.equal(getActiveAdapterFx(url)?.name, 'coupang');
2466+
}
2467+
2468+
const rejectedUrls = [
2469+
'https://wing.coupang.com/',
2470+
'https://www.tw.coupang.com/',
2471+
'https://coupang.com.phishing.example/vp/products/40994378',
2472+
'https://example.com/coupang.com/vp/products/40994378',
2473+
];
2474+
for (const url of rejectedUrls) {
2475+
assert.notEqual(getActiveAdapter(url)?.name, 'coupang');
2476+
assert.notEqual(getActiveAdapterFx(url)?.name, 'coupang');
2477+
}
2478+
2479+
const adapter = getActiveAdapter('https://www.coupang.com/vp/products/40994378');
2480+
const firefoxAdapter = getActiveAdapterFx('https://cart.coupang.com/');
2481+
assert.match(adapter?.notes || '', /2026-07/);
2482+
assert.match(adapter?.notes || '', /Akamai Access Denied/);
2483+
assert.match(adapter?.notes || '', /배송비 포함/);
2484+
assert.match(adapter?.notes || '', /낮은가격순/);
2485+
assert.match(adapter?.notes || '', /판매자/);
2486+
assert.match(adapter?.notes || '', /different sellers/i);
2487+
assert.match(adapter?.notes || '', /로켓배송/);
2488+
assert.match(adapter?.notes || '', /와우/);
2489+
assert.match(adapter?.notes || '', /장바구니 담기/);
2490+
assert.match(adapter?.notes || '', /바로구매/);
2491+
assert.equal(firefoxAdapter?.notes, adapter?.notes);
2492+
});
2493+
24562494
test('matches sahibinden.com and includes anti-bot guidance', () => {
24572495
assert.equal(getActiveAdapter('https://www.sahibinden.com/')?.name, 'sahibinden');
24582496
assert.equal(getActiveAdapter('https://sahibinden.com/kategori/vasita')?.name, 'sahibinden');

0 commit comments

Comments
 (0)