Skip to content

Commit 340df57

Browse files
authored
Merge pull request #2619 from alectimison-maker/agent/rakuten-ichiba-adapter
agent: add adapter for Rakuten Ichiba
2 parents a696af5 + faaa4d5 commit 340df57

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 — Rakuten Ichiba (Japan) ────────────────────────────────
16298+
{
16299+
name: 'rakuten-ichiba',
16300+
category: 'general',
16301+
matches: (url) => /^https?:\/\/(?:(?:www|search|item)\.rakuten\.co\.jp|basket\.step\.rakuten\.co\.jp)\//.test(url),
16302+
notes: `
16303+
- As of 2026-07, Rakuten Ichiba is a MARKETPLACE of independently operated "ショップ" (shops). Stable labels: "買い物かごに入れる" = add to cart, "買い物かご" = cart, and "ご購入手続き" = proceed to checkout.
16304+
- Search results marked "[PR]" are sponsored. For a price comparison, use "同じ商品を安い順で見る" when available, then compare the exact variant's "価格+送料" and per-unit price; do not rank the first result or a bare "〜" price range as cheapest.
16305+
- Select every size, color, pack count, delivery timing, and other required option before comparing or adding. "定期購入" is a recurring purchase with a different price — keep normal purchase selected unless the user explicitly asks for a subscription.
16306+
- The cart is divided into boxes by shop. On desktop, items from different shops cannot share one checkout; mobile "おまとめ購入" may batch the steps, but each shop still creates a separate order and shipment. Read each box and click its own "ご購入手続き".
16307+
- Shipping is shop- and destination-specific. A 39 Shop's 3,980円 free-shipping line applies within the same eligible shop and order, not across shops; "特定送料", remote regions, chilled delivery, and large items can remain chargeable. Verify every shop's cart total.
16308+
- "ポイント", SPU, and スーパーDEAL are conditional rewards, not an immediate cash-price reduction; campaigns may require entry, membership, payment methods, or have caps, and shipping/tax do not earn ordinary points. Report the payable total separately from expected points.`,
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 — Rakuten Ichiba (Japan) ────────────────────────────────
16296+
{
16297+
name: 'rakuten-ichiba',
16298+
category: 'general',
16299+
matches: (url) => /^https?:\/\/(?:(?:www|search|item)\.rakuten\.co\.jp|basket\.step\.rakuten\.co\.jp)\//.test(url),
16300+
notes: `
16301+
- As of 2026-07, Rakuten Ichiba is a MARKETPLACE of independently operated "ショップ" (shops). Stable labels: "買い物かごに入れる" = add to cart, "買い物かご" = cart, and "ご購入手続き" = proceed to checkout.
16302+
- Search results marked "[PR]" are sponsored. For a price comparison, use "同じ商品を安い順で見る" when available, then compare the exact variant's "価格+送料" and per-unit price; do not rank the first result or a bare "〜" price range as cheapest.
16303+
- Select every size, color, pack count, delivery timing, and other required option before comparing or adding. "定期購入" is a recurring purchase with a different price — keep normal purchase selected unless the user explicitly asks for a subscription.
16304+
- The cart is divided into boxes by shop. On desktop, items from different shops cannot share one checkout; mobile "おまとめ購入" may batch the steps, but each shop still creates a separate order and shipment. Read each box and click its own "ご購入手続き".
16305+
- Shipping is shop- and destination-specific. A 39 Shop's 3,980円 free-shipping line applies within the same eligible shop and order, not across shops; "特定送料", remote regions, chilled delivery, and large items can remain chargeable. Verify every shop's cart total.
16306+
- "ポイント", SPU, and スーパーDEAL are conditional rewards, not an immediate cash-price reduction; campaigns may require entry, membership, payment methods, or have caps, and shipping/tax do not earn ordinary points. Report the payable total separately from expected points.`,
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 Rakuten Ichiba shopping surfaces and includes marketplace guidance', () => {
2457+
const trustedUrls = [
2458+
'https://www.rakuten.co.jp/',
2459+
'https://search.rakuten.co.jp/search/mall/%E6%B0%B4/',
2460+
'https://item.rakuten.co.jp/example-shop/example-item/',
2461+
'https://basket.step.rakuten.co.jp/rms/mall/bs/cart/',
2462+
];
2463+
for (const url of trustedUrls) {
2464+
assert.equal(getActiveAdapter(url)?.name, 'rakuten-ichiba');
2465+
assert.equal(getActiveAdapterFx(url)?.name, 'rakuten-ichiba');
2466+
}
2467+
2468+
const rejectedUrls = [
2469+
'https://travel.rakuten.co.jp/',
2470+
'https://books.rakuten.co.jp/',
2471+
'https://order.step.rakuten.co.jp/',
2472+
'https://www.rakuten.co.jp.phishing.example/',
2473+
'https://example.com/item.rakuten.co.jp/example-shop/example-item/',
2474+
];
2475+
for (const url of rejectedUrls) {
2476+
assert.notEqual(getActiveAdapter(url)?.name, 'rakuten-ichiba');
2477+
assert.notEqual(getActiveAdapterFx(url)?.name, 'rakuten-ichiba');
2478+
}
2479+
2480+
const adapter = getActiveAdapter('https://search.rakuten.co.jp/search/mall/%E6%B0%B4/');
2481+
const firefoxAdapter = getActiveAdapterFx('https://item.rakuten.co.jp/example-shop/example-item/');
2482+
assert.match(adapter?.notes || '', /2026-07/);
2483+
assert.match(adapter?.notes || '', /\[PR\]/);
2484+
assert.match(adapter?.notes || '', /同じ商品を安い順で見る/);
2485+
assert.match(adapter?.notes || '', /定期購入/);
2486+
assert.match(adapter?.notes || '', /different shops/i);
2487+
assert.match(adapter?.notes || '', /ご購入手続き/);
2488+
assert.match(adapter?.notes || '', /3,980円/);
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)