Open-source AI browser agent for Chrome and Firefox (monorepo) π§
JavaScript ai-agentai-agentsai-toolsbrowser-aibrowser-automationbrowser-extensionchrome-aichrome-devtoolschrome-extensionchrome-extensionsfirefox-addonfirefox-addonsfirefox-extensionfirefox-extensionsgemmagemma4minimaxoffline-aioffline-llmqwen
fix: cover Africa and MENA adapter hosts
Barack Sokullud3db312ecfcb
diff --git a/src/chrome/src/agent/adapters.js b/src/chrome/src/agent/adapters.jsindex 713b32f5e..6db34157f 100644--- a/src/chrome/src/agent/adapters.js+++ b/src/chrome/src/agent/adapters.js@@ -17728,9 +17728,9 @@ const ADAPTERS = [{name: 'jumia',category: 'general',- matches: (url) => /^https?:\/\/(?:www\.)?jumia\.(?:com|com\.ng|co\.ke|com\.eg|co\.za|com\.gh|dz|ma|sn|co\.ug|ug)\//.test(url),+ matches: (url) => /^https?:\/\/(?:www\.)?jumia\.(?:com|com\.ng|co\.ke|com\.eg|co\.za|com\.gh|dz|ma|sn|ci|co\.ug|ug)\//.test(url),notes: `-- Jumia (jumia.com + country stores .com.ng/.co.ke/.com.eg/.co.za/.dz/.ma/.sn/.ug) is Africa's marketplace. "Jumia Express" means Jumia-fulfilled; other sellers are marketplace with separate ratings and returns β check "Sold by" and seller rating before quoting.+- Jumia (jumia.com + country stores .com.ng/.co.ke/.com.eg/.co.za/.dz/.ma/.sn/.ci/.ug) is Africa's marketplace. "Jumia Express" means Jumia-fulfilled; other sellers are marketplace with separate ratings and returns β check "Sold by" and seller rating before quoting.- Variant trap: pick size/color/capacity BEFORE "Add to cart" β required options block the add until chosen. "Add to cart" opens a drawer; cart lives at /cart.- Price trap: JumiaPay discounts and coupons apply only at checkout β quote the cart total, not the product card price. Delivery fee and COD surcharge appear at cart; verify before promising total.- Location-first: delivery availability and fee depend on city/address set in the header. Set it first or availability is meaningless. Use "Filters" and "Sort by" (price lowβhigh) rather than URL edits.@@ -17739,9 +17739,9 @@ const ADAPTERS = [{name: 'kilimall',category: 'general',- matches: (url) => /^https?:\/\/(?:www\.)?kilimall\.(?:co\.ke|com)\//.test(url),+ matches: (url) => /^https?:\/\/(?:(?:www\.)?kilimall\.(?:co\.ke|ug|com)|(?:m|h5)\.kilimall\.co\.ke)\//.test(url),notes: `-- Kilimall (kilimall.co.ke / kilimall.com) is East Africa (Kenya-focused) marketplace. Marketplace sellers per product β check "Sold by" and store rating; the card price is not the fulfillment total across sellers.+- Kilimall (kilimall.co.ke / kilimall.ug / kilimall.com) is an East Africa marketplace. Marketplace sellers per product β check "Sold by" and store rating; the card price is not the fulfillment total across sellers.- Variant trap: pick size/color BEFORE "Add to Cart" β the button is inert until required options are chosen. "Add to Cart" vs "Buy Now" are distinct β use cart for comparison.- Price trap: coupons, Kilimall points, and M-Pesa discounts apply at cart/checkout only β quote the cart total, not the product card price. Shipping cost appears at checkout based on origin/weight.- Set delivery county/town before quoting availability or ETA; sort via "Sort by" and filter via left rail rather than URL edits. Do NOT pay without explicit user confirmation of seller, variant, and total.`,@@ -17749,7 +17749,7 @@ const ADAPTERS = [{name: 'careem',category: 'general',- matches: (url) => /^https?:\/\/(?:www\.)?careem\.com\//.test(url),+ matches: (url) => /^https?:\/\/(?:(?:www|app|food|pay)\.)?careem\.com\//.test(url),notes: `- Careem (careem.com) is MENA super-app β Rides, Food, Quik (grocery), Pay, Shops are SEPARATE verticals with separate carts/flows. Pick the vertical that matches the task β a Food cart does not contain a Ride booking.- Location-first trap: set pickup/delivery address (map pin or "Delivery address") BEFORE the catalog or fare is meaningful β restaurants, stores, and ride availability are geo-fenced.diff --git a/src/firefox/src/agent/adapters.js b/src/firefox/src/agent/adapters.jsindex ed1af09fe..600e531d4 100644--- a/src/firefox/src/agent/adapters.js+++ b/src/firefox/src/agent/adapters.js@@ -17726,9 +17726,9 @@ const ADAPTERS = [{name: 'jumia',category: 'general',- matches: (url) => /^https?:\/\/(?:www\.)?jumia\.(?:com|com\.ng|co\.ke|com\.eg|co\.za|com\.gh|dz|ma|sn|co\.ug|ug)\//.test(url),+ matches: (url) => /^https?:\/\/(?:www\.)?jumia\.(?:com|com\.ng|co\.ke|com\.eg|co\.za|com\.gh|dz|ma|sn|ci|co\.ug|ug)\//.test(url),notes: `-- Jumia (jumia.com + country stores .com.ng/.co.ke/.com.eg/.co.za/.dz/.ma/.sn/.ug) is Africa's marketplace. "Jumia Express" means Jumia-fulfilled; other sellers are marketplace with separate ratings and returns β check "Sold by" and seller rating before quoting.+- Jumia (jumia.com + country stores .com.ng/.co.ke/.com.eg/.co.za/.dz/.ma/.sn/.ci/.ug) is Africa's marketplace. "Jumia Express" means Jumia-fulfilled; other sellers are marketplace with separate ratings and returns β check "Sold by" and seller rating before quoting.- Variant trap: pick size/color/capacity BEFORE "Add to cart" β required options block the add until chosen. "Add to cart" opens a drawer; cart lives at /cart.- Price trap: JumiaPay discounts and coupons apply only at checkout β quote the cart total, not the product card price. Delivery fee and COD surcharge appear at cart; verify before promising total.- Location-first: delivery availability and fee depend on city/address set in the header. Set it first or availability is meaningless. Use "Filters" and "Sort by" (price lowβhigh) rather than URL edits.@@ -17737,9 +17737,9 @@ const ADAPTERS = [{name: 'kilimall',category: 'general',- matches: (url) => /^https?:\/\/(?:www\.)?kilimall\.(?:co\.ke|com)\//.test(url),+ matches: (url) => /^https?:\/\/(?:(?:www\.)?kilimall\.(?:co\.ke|ug|com)|(?:m|h5)\.kilimall\.co\.ke)\//.test(url),notes: `-- Kilimall (kilimall.co.ke / kilimall.com) is East Africa (Kenya-focused) marketplace. Marketplace sellers per product β check "Sold by" and store rating; the card price is not the fulfillment total across sellers.+- Kilimall (kilimall.co.ke / kilimall.ug / kilimall.com) is an East Africa marketplace. Marketplace sellers per product β check "Sold by" and store rating; the card price is not the fulfillment total across sellers.- Variant trap: pick size/color BEFORE "Add to Cart" β the button is inert until required options are chosen. "Add to Cart" vs "Buy Now" are distinct β use cart for comparison.- Price trap: coupons, Kilimall points, and M-Pesa discounts apply at cart/checkout only β quote the cart total, not the product card price. Shipping cost appears at checkout based on origin/weight.- Set delivery county/town before quoting availability or ETA; sort via "Sort by" and filter via left rail rather than URL edits. Do NOT pay without explicit user confirmation of seller, variant, and total.`,@@ -17747,7 +17747,7 @@ const ADAPTERS = [{name: 'careem',category: 'general',- matches: (url) => /^https?:\/\/(?:www\.)?careem\.com\//.test(url),+ matches: (url) => /^https?:\/\/(?:(?:www|app|food|pay)\.)?careem\.com\//.test(url),notes: `- Careem (careem.com) is MENA super-app β Rides, Food, Quik (grocery), Pay, Shops are SEPARATE verticals with separate carts/flows. Pick the vertical that matches the task β a Food cart does not contain a Ride booking.- Location-first trap: set pickup/delivery address (map pin or "Delivery address") BEFORE the catalog or fare is meaningful β restaurants, stores, and ride availability are geo-fenced.diff --git a/test/run.js b/test/run.jsindex dc5573c72..30bf8bbdb 100644--- a/test/run.js+++ b/test/run.js@@ -10265,6 +10265,30 @@ test('Noon adapter covers its primary and Supermall storefronts without trusting}});+test('Africa and MENA adapters cover country, mobile, and transactional hosts', () => {+ for (const getAdapter of [getActiveAdapter, getActiveAdapterFx]) {+ assert.equal(getAdapter('https://www.jumia.ci/catalog/')?.name, 'jumia');+ assert.notEqual(getAdapter('https://www.jumia.ci.evil.example/catalog/')?.name, 'jumia');++ for (const url of [+ 'https://www.kilimall.ug/product/123',+ 'https://m.kilimall.co.ke/product/123',+ 'https://h5.kilimall.co.ke/cart',+ ]) assert.equal(getAdapter(url)?.name, 'kilimall', url);+ assert.notEqual(getAdapter('https://m.kilimall.co.ke.evil.example/product/123')?.name, 'kilimall');++ for (const url of [+ 'https://app.careem.com/ride',+ 'https://food.careem.com/restaurants',+ 'https://pay.careem.com/',+ ]) assert.equal(getAdapter(url)?.name, 'careem', url);+ for (const url of [+ 'https://help.careem.com/',+ 'https://pay.careem.com.evil.example/',+ ]) assert.notEqual(getAdapter(url)?.name, 'careem', url);+ }+});+test('India payment and Tatkal guidance keeps finance, timing, and authentication safety signals', () => {for (const getAdapter of [getActiveAdapter, getActiveAdapterFx]) {const paytm = getAdapter('https://paytm.com/recharge');