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(social-publish): past-tense verbs never bind destinations
Barack Sokulluf84f3b8032eb
diff --git a/src/chrome/src/agent/agent.js b/src/chrome/src/agent/agent.jsindex ed65c701f..ff1b5d377 100644--- a/src/chrome/src/agent/agent.js+++ b/src/chrome/src/agent/agent.js@@ -18152,6 +18152,9 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout dif (SOCIAL_READ_VERBS.test(beforeVerbClause)) continue;if (socialNegationGovernsPublish(beforeVerbClause)) continue;const verbWord = verb[0] || '';+ // A past-tense verb describes already-published content ("the post+ // published on X"), it never issues a new publication command.+ if (/ed$/iu.test(verbWord)) continue;const unscopedAfterVerbText = targetText.slice(verbIndex + verbWord.length);const nextPublish = unscopedAfterVerbText.match(SOCIAL_PUBLISH_VERBS);const afterVerbText = nextPublishdiff --git a/src/firefox/src/agent/agent.js b/src/firefox/src/agent/agent.jsindex fb15392cd..0f0e502b5 100644--- a/src/firefox/src/agent/agent.js+++ b/src/firefox/src/agent/agent.js@@ -15951,6 +15951,9 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout dif (SOCIAL_READ_VERBS.test(beforeVerbClause)) continue;if (socialNegationGovernsPublish(beforeVerbClause)) continue;const verbWord = verb[0] || '';+ // A past-tense verb describes already-published content ("the post+ // published on X"), it never issues a new publication command.+ if (/ed$/iu.test(verbWord)) continue;const unscopedAfterVerbText = targetText.slice(verbIndex + verbWord.length);const nextPublish = unscopedAfterVerbText.match(SOCIAL_PUBLISH_VERBS);const afterVerbText = nextPublishdiff --git a/test/run.js b/test/run.jsindex bf1ddfe45..4c752c55a 100644--- a/test/run.js+++ b/test/run.js@@ -91084,6 +91084,10 @@ test('social publication workflow follows the live X or Bluesky destination and'French content link to form should not compete with Bluesky publish destination'],['Veröffentliche einen Link zur Umfrage auf X', ['twitter'],'German content link to survey should not compete with X publish destination'],+ ['Use the post published on X to fill the form.', [],+ 'past-tense mention of an existing post was bound as a publish destination'],+ ['A post shared on Bluesky should be entered into the form.', [],+ 'past-tense mention of an existing post was bound as a publish destination'],]) {assert.deepEqual([...agent._trustedSocialPublishTargetAdapters({ taskText })].sort(),