Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

agent: add adapters for swiggy, irctc, paytm, snapdeal (India daily-use bundle)

Ayush7614875882449241
diff --git a/src/chrome/src/agent/adapters.js b/src/chrome/src/agent/adapters.js
index b3d0ab54d..adafd985a 100644
--- a/src/chrome/src/agent/adapters.js
+++ b/src/chrome/src/agent/adapters.js
@@ -17627,6 +17627,53 @@ const ADAPTERS = [
- Stickers, GIFs, and bot commands (/) all live in popups above the message input.
- DO NOT send a message unless the user named the recipient AND the exact message body in this conversation.
- "Edit message" works for a window after sending (~48h); "Delete for everyone" within a shorter window β€” both have explicit confirms.`,
+ },
+ // ─── Regional β€” India daily-use (IN) ────────────────────────────────
+ // High-priority CONTRIBUTING.md coverage: food, rail, payments, value
+ // marketplace. Keep before the federated Mastodon matcher.
+ {
+ name: 'swiggy',
+ category: 'general',
+ matches: (url) => /^https?:\/\/(www\.)?swiggy\.com\//.test(url),
+ notes: `
+- Swiggy is India's food-delivery + quick-commerce site (Food, Instamart grocery, Dineout). As of 2026-09, ordering needs a delivery LOCATION first β€” set it via the location pin/header ("Enter delivery address") before the restaurant list is meaningful; without it listings are generic.
+- Restaurant discovery: search by dish/restaurant, then open the restaurant page. Veg-only toggle ("Veg"), "Offers" filter, ratings ("4.0+"), cost-for-two, and delivery-time sort live above the list β€” set them instead of guessing URL params.
+- Dish trap: many dishes have REQUIRED customisations (size, spice, add-ons) in a modal. Pick them before "Add". "Add" becomes "ADD +" stepper; the cart is the header "Cart" drawer, not a page.
+- Instamart is a SEPARATE tab/flow from Food with its own cart β€” do not mix Food and Instamart items in one checkout.
+- Checkout requires login (phone OTP). Do NOT place the order without explicit user confirmation β€” payment/UPI is irreversible. Success = order-tracking page with ETA, not the cart drawer.`,
+ },
+ {
+ name: 'irctc',
+ category: 'general',
+ matches: (url) => /^https?:\/\/(www\.)?irctc\.co\.in\//.test(url),
+ notes: `
+- IRCTC (irctc.co.in) is Indian Railways ticketing. Login ("LOGIN") needs username/password + CAPTCHA; booking also needs passenger details (name, age, berth preference) and an explicit user confirm before "Book Now".
+- Search with station CODES (e.g. NDLS, BCT, HWH) in "From"/"To", journey date, and quota ("General", "Tatkal", "Ladies"). Sort/filter by class (SL/3A/2A/1A/CC) and train type; availability colours (Available/RAC/WL + number) are per class β€” read the exact class row before quoting.
+- Tatkal trap: Tatkal opens ~24h before departure (AC ~10:00, non-AC ~11:00 IST) and sells out in minutes. Do NOT promise a Tatkal berth without checking live availability at booking time.
+- PNR/status trap: "PNR Status" is a separate flow from booking history ("Booked Ticket History"). Cancel via "Cancel Ticket" with confirmation; partial-cancel needs per-passenger selection.
+- Never submit payment or final booking without the user confirming train number, class, date, quota, and passenger list. Success = PNR on the booking-confirmation page.`,
+ },
+ {
+ name: 'paytm',
+ category: 'general',
+ matches: (url) => /^https?:\/\/(www\.)?paytm\.com\//.test(url),
+ notes: `
+- Paytm is Indian recharge/bills/UPI/payments. Top flows: Mobile Recharge, DTH, Electricity, Gas, Broadband, Credit-card bill. Pick the operator/circle (e.g. "Airtel Prepaid", state electricity board) BEFORE entering the number β€” plans and bill-fetch depend on it.
+- Bill-fetch trap: postpaid/utility pages "Fetch Bill" from the account/consumer number first; the payable amount appears only after fetch. Do NOT pay a stale or typed amount without fetching.
+- Pay-via choice matters: UPI vs Wallet vs card/netbanking are separate radios at checkout. Wallet balance may be insufficient β€” check it before promising a wallet payment.
+- Login is phone-OTP; KYC-gated features (Wallet top-up limits) fail without it. Surface OTP/login to the user and stop β€” do not loop retries.
+- Do NOT complete any payment without explicit user confirmation of payee, amount, and method. Success = transaction/UPI reference ID page, not the "Pay" button state.`,
+ },
+ {
+ name: 'snapdeal',
+ category: 'general',
+ matches: (url) => /^https?:\/\/(www\.)?snapdeal\.com\//.test(url),
+ notes: `
+- Snapdeal is an Indian value-goods MARKETPLACE (unbranded/apparel/home). Prices are low but sizes/sellers vary β€” open the product page and read the exact variant before quoting.
+- Pincode-first trap: delivery/availability depends on the delivery "Pincode" set near the buy box. Set it first; "Check" reveals COD availability and delivery ETA.
+- Variant trap: pick Size/Color BEFORE "Add To Cart"/"Buy Now" β€” required options block the add until chosen.
+- COD vs prepaid: many listings offer Cash on Delivery; prepaid may show extra discount. Confirm the payment choice with the user β€” do not assume.
+- Sort via "Sort by" (popularity, price low→high) and filter via the left rail (Brand, Price, Size, Ratings) rather than URL edits. Cart lives at /cart; checkout needs login/OTP.`,
},
{
// Mastodon is federated and self-hosted across many domains. Keep this
diff --git a/src/firefox/src/agent/adapters.js b/src/firefox/src/agent/adapters.js
index 5f9baa105..2fba047e7 100644
--- a/src/firefox/src/agent/adapters.js
+++ b/src/firefox/src/agent/adapters.js
@@ -17625,6 +17625,53 @@ const ADAPTERS = [
- Stickers, GIFs, and bot commands (/) all live in popups above the message input.
- DO NOT send a message unless the user named the recipient AND the exact message body in this conversation.
- "Edit message" works for a window after sending (~48h); "Delete for everyone" within a shorter window β€” both have explicit confirms.`,
+ },
+ // ─── Regional β€” India daily-use (IN) ────────────────────────────────
+ // High-priority CONTRIBUTING.md coverage: food, rail, payments, value
+ // marketplace. Keep before the federated Mastodon matcher.
+ {
+ name: 'swiggy',
+ category: 'general',
+ matches: (url) => /^https?:\/\/(www\.)?swiggy\.com\//.test(url),
+ notes: `
+- Swiggy is India's food-delivery + quick-commerce site (Food, Instamart grocery, Dineout). As of 2026-09, ordering needs a delivery LOCATION first β€” set it via the location pin/header ("Enter delivery address") before the restaurant list is meaningful; without it listings are generic.
+- Restaurant discovery: search by dish/restaurant, then open the restaurant page. Veg-only toggle ("Veg"), "Offers" filter, ratings ("4.0+"), cost-for-two, and delivery-time sort live above the list β€” set them instead of guessing URL params.
+- Dish trap: many dishes have REQUIRED customisations (size, spice, add-ons) in a modal. Pick them before "Add". "Add" becomes "ADD +" stepper; the cart is the header "Cart" drawer, not a page.
+- Instamart is a SEPARATE tab/flow from Food with its own cart β€” do not mix Food and Instamart items in one checkout.
+- Checkout requires login (phone OTP). Do NOT place the order without explicit user confirmation β€” payment/UPI is irreversible. Success = order-tracking page with ETA, not the cart drawer.`,
+ },
+ {
+ name: 'irctc',
+ category: 'general',
+ matches: (url) => /^https?:\/\/(www\.)?irctc\.co\.in\//.test(url),
+ notes: `
+- IRCTC (irctc.co.in) is Indian Railways ticketing. Login ("LOGIN") needs username/password + CAPTCHA; booking also needs passenger details (name, age, berth preference) and an explicit user confirm before "Book Now".
+- Search with station CODES (e.g. NDLS, BCT, HWH) in "From"/"To", journey date, and quota ("General", "Tatkal", "Ladies"). Sort/filter by class (SL/3A/2A/1A/CC) and train type; availability colours (Available/RAC/WL + number) are per class β€” read the exact class row before quoting.
+- Tatkal trap: Tatkal opens ~24h before departure (AC ~10:00, non-AC ~11:00 IST) and sells out in minutes. Do NOT promise a Tatkal berth without checking live availability at booking time.
+- PNR/status trap: "PNR Status" is a separate flow from booking history ("Booked Ticket History"). Cancel via "Cancel Ticket" with confirmation; partial-cancel needs per-passenger selection.
+- Never submit payment or final booking without the user confirming train number, class, date, quota, and passenger list. Success = PNR on the booking-confirmation page.`,
+ },
+ {
+ name: 'paytm',
+ category: 'general',
+ matches: (url) => /^https?:\/\/(www\.)?paytm\.com\//.test(url),
+ notes: `
+- Paytm is Indian recharge/bills/UPI/payments. Top flows: Mobile Recharge, DTH, Electricity, Gas, Broadband, Credit-card bill. Pick the operator/circle (e.g. "Airtel Prepaid", state electricity board) BEFORE entering the number β€” plans and bill-fetch depend on it.
+- Bill-fetch trap: postpaid/utility pages "Fetch Bill" from the account/consumer number first; the payable amount appears only after fetch. Do NOT pay a stale or typed amount without fetching.
+- Pay-via choice matters: UPI vs Wallet vs card/netbanking are separate radios at checkout. Wallet balance may be insufficient β€” check it before promising a wallet payment.
+- Login is phone-OTP; KYC-gated features (Wallet top-up limits) fail without it. Surface OTP/login to the user and stop β€” do not loop retries.
+- Do NOT complete any payment without explicit user confirmation of payee, amount, and method. Success = transaction/UPI reference ID page, not the "Pay" button state.`,
+ },
+ {
+ name: 'snapdeal',
+ category: 'general',
+ matches: (url) => /^https?:\/\/(www\.)?snapdeal\.com\//.test(url),
+ notes: `
+- Snapdeal is an Indian value-goods MARKETPLACE (unbranded/apparel/home). Prices are low but sizes/sellers vary β€” open the product page and read the exact variant before quoting.
+- Pincode-first trap: delivery/availability depends on the delivery "Pincode" set near the buy box. Set it first; "Check" reveals COD availability and delivery ETA.
+- Variant trap: pick Size/Color BEFORE "Add To Cart"/"Buy Now" β€” required options block the add until chosen.
+- COD vs prepaid: many listings offer Cash on Delivery; prepaid may show extra discount. Confirm the payment choice with the user β€” do not assume.
+- Sort via "Sort by" (popularity, price low→high) and filter via the left rail (Brand, Price, Size, Ratings) rather than URL edits. Cart lives at /cart; checkout needs login/OTP.`,
},
{
// Mastodon is federated and self-hosted across many domains. Keep this