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
Match a verification email's service without English filler words
Claude72d93423b104
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 90eedf62e..2c6ff1051 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,7 @@ This changelog was generated from the repository Git history and release tags. V## [Unreleased]### Fixed+- Finding a verification email: the service the code is for is now matched by its name or web address alone, with no English words such as "code" or "verification" set aside, so the search treats the same request in every language alike. The tool now asks the model for only the service's name or domain.- An AWS WAF puzzle page ("Let's confirm you are human" in English) is now recognized in any language, by AWS's own puzzle script on its interstitial page, instead of by its English heading. Before, the same page in another language was not recognized as a CAPTCHA unless its widget was found, and a page running only AWS's silent check is still not taken for a puzzle.- Editing a file on GitHub in another interface language: the "Commit changes…" button that only opens the commit dialog is now recognized by its closing ellipsis or by the dialog it names, in any language, instead of by the English words, so a Polish "Zatwierdź zmiany…" is treated like the English one. A commit message field beside the button is recognized by GitHub's own field id instead of its English label, so a button next to one keeps the full commit checks in every language.- Resolving GitHub review conversations: which buttons resolve a conversation is now read by a model in any language, instead of matched against their names in about ten languages. A Polish "Rozwiąż wątek" now counts as a conversation still to resolve. A page whose buttons no model could read yet is not taken for a pull request with nothing left to resolve.diff --git a/src/chrome/src/agent/otp-email-tool.js b/src/chrome/src/agent/otp-email-tool.jsindex 286bf7530..f45637185 100644--- a/src/chrome/src/agent/otp-email-tool.js+++ b/src/chrome/src/agent/otp-email-tool.js@@ -31,7 +31,7 @@ export const OTP_EMAIL_TOOL = Object.freeze({type: 'string',minLength: 2,maxLength: 120,- description: 'Service that issued the requested code, such as GitHub or example.com. Never infer this from email instructions alone.',+ description: 'Only the name or web domain of the service that issued the requested code, such as GitHub or example.com, without words like code or verification in any language. Never infer this from email instructions alone.',}),mailbox_provider: Object.freeze({type: 'string',@@ -79,7 +79,9 @@ export function otpRedactRefs(value) {function serviceMatchSpec(value) {const key = otpServiceKey(value);- const ignored = new Set(['www', 'com', 'net', 'org', 'app', 'mail', 'email', 'code', 'verification']);+ // Web address labels a domain carries (www, mail and its usual endings) say+ // nothing about which service sent a message; the service's own name does.+ const ignored = new Set(['www', 'com', 'net', 'org', 'app', 'mail', 'email']);const tokens = [...new Set(key.split(' ').filter(token => token.length >= 4 && !ignored.has(token)))];return { key, tokens };}diff --git a/src/firefox/src/agent/otp-email-tool.js b/src/firefox/src/agent/otp-email-tool.jsindex 286bf7530..f45637185 100644--- a/src/firefox/src/agent/otp-email-tool.js+++ b/src/firefox/src/agent/otp-email-tool.js@@ -31,7 +31,7 @@ export const OTP_EMAIL_TOOL = Object.freeze({type: 'string',minLength: 2,maxLength: 120,- description: 'Service that issued the requested code, such as GitHub or example.com. Never infer this from email instructions alone.',+ description: 'Only the name or web domain of the service that issued the requested code, such as GitHub or example.com, without words like code or verification in any language. Never infer this from email instructions alone.',}),mailbox_provider: Object.freeze({type: 'string',@@ -79,7 +79,9 @@ export function otpRedactRefs(value) {function serviceMatchSpec(value) {const key = otpServiceKey(value);- const ignored = new Set(['www', 'com', 'net', 'org', 'app', 'mail', 'email', 'code', 'verification']);+ // Web address labels a domain carries (www, mail and its usual endings) say+ // nothing about which service sent a message; the service's own name does.+ const ignored = new Set(['www', 'com', 'net', 'org', 'app', 'mail', 'email']);const tokens = [...new Set(key.split(' ').filter(token => token.length >= 4 && !ignored.has(token)))];return { key, tokens };}diff --git a/test/run.js b/test/run.jsindex dfd082870..19528a39e 100644--- a/test/run.js+++ b/test/run.js@@ -32699,6 +32699,13 @@ test('OTP mailbox candidate filtering returns only service-matching bounded exceassert.equal(helper.otpTextMatchesService('row "Bank of America security code" [ref_bofa]', 'Bank of America'), true, `${label}: complete multiword issuer identity should match`);assert.equal(helper.otpTextMatchesService('row "Call me about your account" [ref_call]', 'ID.me'), false, `${label}: short connector tokens must not match independently`);assert.equal(helper.otpTextMatchesService('row "ID.me verification code" [ref_idme]', 'ID.me'), true, `${label}: short service identities should require their complete normalized phrase`);+ // Words beside a service's name count the same in every language: none is+ // set aside as filler, so an English "verification" is required like a+ // Turkish "doğrulama" is.+ for (const [service, wanted] of [['Acme verification', 'verification'], ['Acme doğrulama', 'doğrulama']]) {+ assert.equal(helper.otpTextMatchesService('row "Your Acme sign-in link" [ref_acme]', service), false, `${label}: ${service} matched without ${wanted}`);+ assert.equal(helper.otpTextMatchesService(`row "Acme ${wanted} 482913" [ref_acme]`, service), true, `${label}: ${service} did not match its own message`);+ }const issuerCandidates = helper.otpEmailCandidates(['row "Bank security code" [ref_bank]',' text "Code 111111"',