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
Guide WordPress editor recovery and preserve post type
Emre Sokullu4c65246a8086
diff --git a/src/chrome/src/agent/adapters.js b/src/chrome/src/agent/adapters.jsindex d2c9c6a68..e8ecd1dc8 100644--- a/src/chrome/src/agent/adapters.js+++ b/src/chrome/src/agent/adapters.js@@ -16441,6 +16441,8 @@ const ADAPTERS = [category: 'general',matches: (url) => /^https?:\/\/[^/]+\/(wp-admin|wp-login\.php)(\/|$|\?)/.test(url),notes: `+- If Gutenberg's iframe/canvas or another WordPress editor blocks writing, try an available alternative before stopping or repeating failed reads: Gutenberg's top-right Options → Code editor (Kod düzenleyicisi, NOT a Code block), Classic/TinyMCE's Text/Kod tab, or an observed switch back from a page builder to the standard WordPress editor. These existing editing surfaces need no new plugin. Re-read the editable fields after switching, then use their fresh AX refs. Preserve existing content and block markup; save/verify the current draft before navigation and keep the same post, categories, and tags.+- Classic Editor is another fallback when the site already supports it: append \`classic-editor\` to the current \`post-new.php\` URL without dropping \`post_type\` or other query parameters (e.g. \`/wp-admin/post-new.php?post_type=page&classic-editor\` for a page, \`/wp-admin/post-new.php?classic-editor\` for an ordinary post). For a saved post, keep its ID in \`/wp-admin/post.php?post=<id>&action=edit&classic-editor\`. Check which editor actually opened; if Gutenberg remains, use its Code editor instead of retrying the URL. Do not install/activate plugins or change site-wide editor settings without explicit user authorization. Never treat GET URLs as a way to create/publish content; submit through the editor and explicitly read the post's published status or live content before reporting success.- "My API key" on WordPress is AMBIGUOUS. The two common meanings:(a) a WP REST API *application password* — per-user, lives at Users → Profile → "Application Passwords" panel (URL contains \`profile.php\`). This is the most common interpretation of "my WordPress API key".(b) a *plugin-specific* key (Rank Math Content AI, Jetpack, Akismet, WP Mail SMTP, etc.) — lives in that plugin's own settings page.@@ -16448,7 +16450,6 @@ const ADAPTERS = [- Don't blindly click \`index: 0\` in /wp-admin/. The first interactive element on every admin page is a skip-to-content link, localized per-user — "Skip to content", "Ana içeriğe git", "Saltar al contenido", "Перейти к содержимому", "コンテンツへスキップ", etc. Clicking it never changes meaningful state. If a \`click({text:...})\` returns "Ambiguous text match", read \`candidates\` and pick the one whose \`tag\`/\`ancestor\` matches your intent.- Two navigation surfaces: top admin bar (horizontal, near the very top) is shortcuts; left sidebar (vertical) is the primary menu. Sidebar items have hover-expanded sub-items. If you need a sub-item that isn't visible, hover the parent via \`click_ax\` first, then re-fetch the a11y tree.- Plugin settings pages put the relevant value on the page directly — once you've navigated there, call \`read_page\` or \`get_accessibility_tree\` BEFORE clicking any sub-link or sub-tab. Don't keep navigating "to find the right page" — you're usually already there.-- For a simpler/old post editor, prefer URL shortcuts before hunting through Gutenberg: \`/wp-admin/post-new.php?classic-editor\` for new posts, or \`/wp-admin/post.php?post=<id>&action=edit&classic-editor\` for existing posts. This only opens Classic Editor when the plugin/site supports it; if WordPress still opens the block editor, continue in the current UI. Never treat GET URLs as a way to create/publish content — saving/publishing still requires the page's form or REST flow with nonce/capability checks.- Localized labels (Turkish examples): Yazılar=Posts, Sayfalar=Pages, Eklentiler=Plugins, Ayarlar=Settings, Kullanıcılar=Users, Profil=Profile, Genel Ayarlar=General Settings, Başlangıç/Pano=Dashboard. Match on URL paths (\`profile.php\`, \`users.php\`, \`options-general.php\`, \`plugins.php\`, \`admin.php?page=...\`) rather than visible text when the site is in a non-English language.- Login pages (\`wp-login.php\`) have a stable shape: \`#user_login\` (username/email), \`#user_pass\` (password), \`#wp-submit\` (submit). The password field is type=password — when the user provides credentials, do not echo them in any summary.`,},diff --git a/src/firefox/src/agent/adapters.js b/src/firefox/src/agent/adapters.jsindex 650ed7ecd..6ef076c3b 100644--- a/src/firefox/src/agent/adapters.js+++ b/src/firefox/src/agent/adapters.js@@ -16439,6 +16439,8 @@ const ADAPTERS = [category: 'general',matches: (url) => /^https?:\/\/[^/]+\/(wp-admin|wp-login\.php)(\/|$|\?)/.test(url),notes: `+- If Gutenberg's iframe/canvas or another WordPress editor blocks writing, try an available alternative before stopping or repeating failed reads: Gutenberg's top-right Options → Code editor (Kod düzenleyicisi, NOT a Code block), Classic/TinyMCE's Text/Kod tab, or an observed switch back from a page builder to the standard WordPress editor. These existing editing surfaces need no new plugin. Re-read the editable fields after switching, then use their fresh AX refs. Preserve existing content and block markup; save/verify the current draft before navigation and keep the same post, categories, and tags.+- Classic Editor is another fallback when the site already supports it: append \`classic-editor\` to the current \`post-new.php\` URL without dropping \`post_type\` or other query parameters (e.g. \`/wp-admin/post-new.php?post_type=page&classic-editor\` for a page, \`/wp-admin/post-new.php?classic-editor\` for an ordinary post). For a saved post, keep its ID in \`/wp-admin/post.php?post=<id>&action=edit&classic-editor\`. Check which editor actually opened; if Gutenberg remains, use its Code editor instead of retrying the URL. Do not install/activate plugins or change site-wide editor settings without explicit user authorization. Never treat GET URLs as a way to create/publish content; submit through the editor and explicitly read the post's published status or live content before reporting success.- "My API key" on WordPress is AMBIGUOUS. The two common meanings:(a) a WP REST API *application password* — per-user, lives at Users → Profile → "Application Passwords" panel (URL contains \`profile.php\`). This is the most common interpretation of "my WordPress API key".(b) a *plugin-specific* key (Rank Math Content AI, Jetpack, Akismet, WP Mail SMTP, etc.) — lives in that plugin's own settings page.@@ -16446,7 +16448,6 @@ const ADAPTERS = [- Don't blindly click \`index: 0\` in /wp-admin/. The first interactive element on every admin page is a skip-to-content link, localized per-user — "Skip to content", "Ana içeriğe git", "Saltar al contenido", "Перейти к содержимому", "コンテンツへスキップ", etc. Clicking it never changes meaningful state. If a \`click({text:...})\` returns "Ambiguous text match", read \`candidates\` and pick the one whose \`tag\`/\`ancestor\` matches your intent.- Two navigation surfaces: top admin bar (horizontal, near the very top) is shortcuts; left sidebar (vertical) is the primary menu. Sidebar items have hover-expanded sub-items. If you need a sub-item that isn't visible, hover the parent via \`click_ax\` first, then re-fetch the a11y tree.- Plugin settings pages put the relevant value on the page directly — once you've navigated there, call \`read_page\` or \`get_accessibility_tree\` BEFORE clicking any sub-link or sub-tab. Don't keep navigating "to find the right page" — you're usually already there.-- For a simpler/old post editor, prefer URL shortcuts before hunting through Gutenberg: \`/wp-admin/post-new.php?classic-editor\` for new posts, or \`/wp-admin/post.php?post=<id>&action=edit&classic-editor\` for existing posts. This only opens Classic Editor when the plugin/site supports it; if WordPress still opens the block editor, continue in the current UI. Never treat GET URLs as a way to create/publish content — saving/publishing still requires the page's form or REST flow with nonce/capability checks.- Localized labels (Turkish examples): Yazılar=Posts, Sayfalar=Pages, Eklentiler=Plugins, Ayarlar=Settings, Kullanıcılar=Users, Profil=Profile, Genel Ayarlar=General Settings, Başlangıç/Pano=Dashboard. Match on URL paths (\`profile.php\`, \`users.php\`, \`options-general.php\`, \`plugins.php\`, \`admin.php?page=...\`) rather than visible text when the site is in a non-English language.- Login pages (\`wp-login.php\`) have a stable shape: \`#user_login\` (username/email), \`#user_pass\` (password), \`#wp-submit\` (submit). The password field is type=password — when the user provides credentials, do not echo them in any summary.`,},