Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/chrome/src/agent/adapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -16337,6 +16337,20 @@ const ADAPTERS = [
- "ポイント", 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.`,
},

// ─── Regional — Allegro (Poland) ─────────────────────────────────────
{
name: 'allegro',
category: 'general',
matches: (url) => /^https?:\/\/(www\.)?allegro\.pl\//.test(url),
notes: `
- As of 2026-07, Allegro.pl is a Polish MARKETPLACE. Stable labels: "dodaj do koszyka" = add to cart, "dostawa i płatność" = delivery and payment, and "kup i zapłać" = buy and pay.
- Search placements marked "Sponsorowane" or "Promowane" are paid placements. For price comparisons choose "cena z dostawą: od najniższej" and compare the delivered total, not the default relevance order or bare item price.
- Product cards can group variants and sellers: "dostępne warianty" means variants are available, while "zobacz N ofert" opens the other offers for that product. Select the exact variant and compare seller, delivery date, and delivered price before choosing.
- The cart can contain products from multiple sellers and groups them by seller. All added products are selected by default, adding does not reserve stock, and delivery is still calculated per seller; re-check the selected rows and totals before continuing.
- "kup i zapłać" is the quick-purchase path and skips the delivery/payment form by reusing saved choices. Do not click it for collection or comparison tasks; use the cart and "dostawa i płatność" when the user wants to review details first.
- Smart! free delivery is conditional on an eligible offer, one seller's qualifying total, the selected delivery method, and the account's current terms. Verify the Smart! badge and cart delivery charge instead of promising free delivery from the badge alone.`,
},

// ─── Regional — Türkiye (TR) ──────────────────────────────────────────
// Regional adapters are the project's #1 wanted contribution (CONTRIBUTING.md);
// Türkiye is top of the priority list. Add more TR sites (trendyol,
Expand Down
14 changes: 14 additions & 0 deletions src/firefox/src/agent/adapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -16335,6 +16335,20 @@ const ADAPTERS = [
- "ポイント", 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.`,
},

// ─── Regional — Allegro (Poland) ─────────────────────────────────────
{
name: 'allegro',
category: 'general',
matches: (url) => /^https?:\/\/(www\.)?allegro\.pl\//.test(url),
notes: `
- As of 2026-07, Allegro.pl is a Polish MARKETPLACE. Stable labels: "dodaj do koszyka" = add to cart, "dostawa i płatność" = delivery and payment, and "kup i zapłać" = buy and pay.
- Search placements marked "Sponsorowane" or "Promowane" are paid placements. For price comparisons choose "cena z dostawą: od najniższej" and compare the delivered total, not the default relevance order or bare item price.
- Product cards can group variants and sellers: "dostępne warianty" means variants are available, while "zobacz N ofert" opens the other offers for that product. Select the exact variant and compare seller, delivery date, and delivered price before choosing.
- The cart can contain products from multiple sellers and groups them by seller. All added products are selected by default, adding does not reserve stock, and delivery is still calculated per seller; re-check the selected rows and totals before continuing.
- "kup i zapłać" is the quick-purchase path and skips the delivery/payment form by reusing saved choices. Do not click it for collection or comparison tasks; use the cart and "dostawa i płatność" when the user wants to review details first.
- Smart! free delivery is conditional on an eligible offer, one seller's qualifying total, the selected delivery method, and the account's current terms. Verify the Smart! badge and cart delivery charge instead of promising free delivery from the badge alone.`,
},

// ─── Regional — Türkiye (TR) ──────────────────────────────────────────
// Regional adapters are the project's #1 wanted contribution (CONTRIBUTING.md);
// Türkiye is top of the priority list. Add more TR sites (trendyol,
Expand Down
37 changes: 37 additions & 0 deletions test/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -2575,6 +2575,43 @@ test('matches Rakuten Ichiba shopping surfaces and includes marketplace guidance
assert.equal(firefoxAdapter?.notes, adapter?.notes);
});

test('matches Allegro.pl shopping surfaces and includes Polish marketplace guidance', () => {
const trustedUrls = [
'https://allegro.pl/',
'https://www.allegro.pl/listing?string=sluchawki',
'https://allegro.pl/oferta/example-product-123456789',
'https://allegro.pl/koszyk',
];
for (const url of trustedUrls) {
assert.equal(getActiveAdapter(url)?.name, 'allegro');
assert.equal(getActiveAdapterFx(url)?.name, 'allegro');
}

const rejectedUrls = [
'https://allegrolokalnie.pl/oferta/example',
'https://allegro.cz/listing?string=sluchawki',
'https://allegro.pl.phishing.example/oferta/example',
'https://example.com/allegro.pl/oferta/example',
];
for (const url of rejectedUrls) {
assert.notEqual(getActiveAdapter(url)?.name, 'allegro');
assert.notEqual(getActiveAdapterFx(url)?.name, 'allegro');
}

const adapter = getActiveAdapter('https://allegro.pl/listing?string=sluchawki');
const firefoxAdapter = getActiveAdapterFx('https://allegro.pl/oferta/example-product-123456789');
assert.match(adapter?.notes || '', /2026-07/);
assert.match(adapter?.notes || '', /MARKETPLACE/);
assert.match(adapter?.notes || '', /Sponsorowane/);
assert.match(adapter?.notes || '', /Promowane/);
assert.match(adapter?.notes || '', /cena z dostawą: od najniższej/);
assert.match(adapter?.notes || '', /zobacz N ofert/);
assert.match(adapter?.notes || '', /kup i zapłać/);
assert.match(adapter?.notes || '', /dostawa i płatność/);
assert.match(adapter?.notes || '', /Smart!/);
assert.equal(firefoxAdapter?.notes, adapter?.notes);
});

test('matches sahibinden.com and includes anti-bot guidance', () => {
assert.equal(getActiveAdapter('https://www.sahibinden.com/')?.name, 'sahibinden');
assert.equal(getActiveAdapter('https://sahibinden.com/kategori/vasita')?.name, 'sahibinden');
Expand Down
Loading