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
Add API-first WordPress content skill and editor fallback guidance
Emre Sokullud28d62d79154
diff --git a/docs/fr/skills.md b/docs/fr/skills.mdindex 8aa17f6ea..ae1a1ae9d 100644--- a/docs/fr/skills.md+++ b/docs/fr/skills.md@@ -79,7 +79,7 @@ initialisées comme activées.### Activées par défaut-Les trois peuvent être retirées dans Paramètres → Compétences. Une valeur par+Les quatre peuvent être retirées dans Paramètres → Compétences. Une valeur pardéfaut retirée n'est pas restaurée silencieusement, pas même par lapréactivation.@@ -143,6 +143,26 @@ Elle ne réécrit que la prose destinée à un lecteur humain. Le contenu cité,adresses, les codes, les prix, les valeurs de champs de formulaire et laformulation que vous fournissez mot pour mot restent intacts.+#### WordPress REST API++Cette compétence se charge uniquement pour les tâches de contenu pertinentes+en Act/Dev, sur Mid et Full. Elle n'ajoute ni outil ni mécanisme+d'authentification. Compact conserve seulement les indications de l'adaptateur.+Pour les articles, pages, types personnalisés compatibles REST et taxonomies,+l'API passe en premier si les champs, la session et l'autorisation le permettent.+Si seule l'autorisation manque, WebBrain demande `/allow-api` une seule fois.+Une autorisation existante suffit ; Ask reste en lecture seule.++La recette conserve l'identifiant existant, crée les nouveaux contenus en+brouillon, vérifie contenu et taxonomies, puis publie le même enregistrement+uniquement sur demande. Une écriture incertaine doit être vérifiée avant toute+nouvelle tentative. Le nonce transmis par `fetch_url` dans `X-WP-Nonce` peut+apparaître dans la conversation du modèle et les traces. Le traitement strict+des secrets impose donc l'interface, sans demander de désactiver ce réglage.+Les surfaces Code/Texte/Classic existantes servent de repli avant tout plugin ;+installer un plugin nécessite toujours une autorisation explicite.+Voir la [recette](../../src/chrome/skills/wordpress-rest-api.md).+### Compétences packagées à activerCes compétences sont livrées avec l'extension et apparaissent dans Paramètres →@@ -160,6 +180,16 @@ Compétences comme disponibles. Elles ne sont pas activées par défaut.N'activez une compétence que si vous voulez ses outils et instructionsdisponibles pour `load_skill` sur les exécutions éligibles.+## Recettes API par service++Gardez les détails dans une compétence dédiée au service, comme WordPress,+Mail.tm (courriel temporaire et repli API) ou Phonr (appels et suivi des démarrages+interrompus). Documentez découverte, champs, authentification, permissions,+exposition des secrets, vérification, écritures incertaines et repli interface.+Le chargement ne donne aucune autorisation API. L'exception WordPress ne change+pas les règles propres à Mail.tm ou Phonr et ne gonfle pas systématiquement les+prompts avec leurs recettes complètes.+## Voir aussi- [Outils de l'agent](agent-tools.md) — niveaux, modes et matrice complètediff --git a/docs/skills.md b/docs/skills.mdindex fd6501976..db7bd5042 100644--- a/docs/skills.md+++ b/docs/skills.md@@ -68,7 +68,7 @@ packaged skill; only the defaults below are seeded enabled.### Enabled by default-All three can be removed from Settings → Skills. A removed default is not+All four can be removed from Settings → Skills. A removed default is notsilently restored, including by preactivation.#### FreeSkillz.xyz@@ -127,6 +127,31 @@ It rewrites only prose being composed for a human reader. Quoted material,addresses, codes, prices, form-field values, and wording you supplied verbatimare left alone.+#### WordPress REST API++Loads through the catalog for relevant Act/Dev content tasks on Mid and Full;+it is not preactivated for every WordPress page. It adds no tool or authentication+bridge. Compact keeps skills disabled and receives short WordPress adapter+guidance through the existing site-adapter path.++For posts, pages, REST-enabled custom types, and their taxonomy, the recipe+prefers the API when all requested fields and the signed-in session are supported+and API mutations are authorized. If the API is viable but permission is missing,+it asks once for `/allow-api`; existing grants are reused. Ask mode cannot write.+It reuses existing record IDs, creates new content as a draft, verifies content+and term IDs, then publishes that same record only when requested. Uncertain+writes must be reconciled before retrying or creating through the editor.++The recipe uses ordinary `fetch_url` with session cookies and a REST nonce in+`X-WP-Nonce`. That nonce can enter the configured LLM conversation and recorded+traces. **Strict secret handling uses the UI instead**, without requesting that+the setting be disabled. Unsupported fields, missing sessions, denied access,+or a declined API grant lead to existing Code/Text/Classic editor surfaces before+considering a plugin. Installing plugins or changing site-wide editor settings+still requires explicit authorization. See the+[packaged recipe](../src/chrome/skills/wordpress-rest-api.md) and+[WordPress authentication documentation](https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/).+### Opt-in packaged skillsThese ship in the extension and appear under Settings → Skills as available to@@ -179,6 +204,22 @@ clip metadata; WebBrain's generic download tool cannot attach a bearer header,so actual audio retrieval uses the local Phonr dashboard or the authenticatedcurl example in the skill. It does not claim to play audio from metadata alone.+## Service-specific API recipes++Keep service details in separate skills so the always-present prompt only needs+the routing and permission rules. WordPress's recipe covers content operations;+Mail.tm documents disposable-mail signup and its API fallback; Phonr documents+phone-call authorization, status, and interrupted-start reconciliation. These+services have different authentication, capabilities, and retry behavior, so a+generic instruction to use any available API is insufficient.++A new recipe should describe discovery, supported operations/fields, permission+requirements, credential exposure, verification, ambiguous-write recovery, and+the UI fallback. Prefer existing tools; loading a skill never grants API mutation+permission or broadens the user's requested outcome. Service-specific API-first+exceptions must also agree with the shared prompts. Existing Mail.tm and Phonr+workflows retain their own rules; the WordPress exception does not change them.+## See also- [Opt-in external memory proposal](memcode-memory-proposal.md) — why hosted MemCode needs an extension-owned OAuth flow before it can be packaged as a skilldiff --git a/docs/zh-CN/skills.md b/docs/zh-CN/skills.mdindex a57865eb7..40e2e9056 100644--- a/docs/zh-CN/skills.md+++ b/docs/zh-CN/skills.md@@ -60,7 +60,7 @@ Markdown 正文前会移除 frontmatter。在设置中输入的名称及 `webbra### 默认启用-三者都可以在设置 → 技能中移除。已移除的默认技能不会被静默恢复,预激活也不会恢复它。+四者都可以在设置 → 技能中移除。已移除的默认技能不会被静默恢复,预激活也不会恢复它。#### FreeSkillz.xyz@@ -103,6 +103,19 @@ Explain、Quiz me、Proofread、Translate——以及在选区输入框中输入它只改写面向真人读者的正文。引用内容、地址、验证码、价格、表单字段值,以及你逐字提供的措辞都保持不变。+#### WordPress REST API++仅在 Mid/Full 的相关 Act/Dev 内容任务中按需加载,不新增工具或身份验证机制。+Compact 仍禁用技能,只使用适配器中的简短指引。对于文章、页面、支持 REST 的自定义+内容类型及分类,确认所需字段、登录会话和 API 修改权限可用后,优先使用 API。+若仅缺少权限,只请求一次 `/allow-api`;已有授权无需重复请求。Ask 模式不执行修改。++保留已有记录 ID,新内容先创建为草稿,核实内容及分类 ID 后,仅按用户要求发布同一+记录。写入结果不确定时,先核实再重试。`fetch_url` 返回的 nonce 和后续 `X-WP-Nonce`+请求头可能进入模型对话及已启用的跟踪记录。因此,严格秘密处理开启时使用界面路径,+不主动要求关闭该设置。API 不适用时,先尝试现有的代码、文本或 Classic 编辑器;+安装插件仍需明确授权。详见[技能配方](../../src/chrome/skills/wordpress-rest-api.md)。+### 可选打包技能这些技能随扩展一起提供,并在设置 → 技能中显示为可启用;默认不会预先打开。@@ -118,6 +131,13 @@ Explain、Quiz me、Proofread、Translate——以及在选区输入框中输入仅在你希望其工具与指令可用于符合条件的运行的 `load_skill` 时再启用。+## 按服务编写 API 配方++将具体操作留在各服务的技能中,例如 WordPress、Mail.tm 的临时邮箱及 API 回退流程、+Phonr 的通话授权和中断恢复。配方应说明端点发现、字段支持、身份验证、权限、凭据暴露、+结果核实、写入不确定时的处理,以及界面回退。加载技能不授予 API 修改权限;WordPress+例外也不会改变 Mail.tm 或 Phonr 自身的规则。这样无需始终将完整流程放进公共提示。+## 另请参阅- [智能体工具](agent-tools.md) — 层级、模式和完整工具矩阵diff --git a/src/chrome/skills/wordpress-rest-api.md b/src/chrome/skills/wordpress-rest-api.mdnew file mode 100644index 000000000..075748940--- /dev/null+++ b/src/chrome/skills/wordpress-rest-api.md@@ -0,0 +1,194 @@+# WordPress REST API++```webbrain-skill+{"summary":"Create, edit, and publish WordPress posts, pages, REST-enabled content types and their categories/tags through the authorized REST API before editor fallback.","modes":["act","dev"],"intents":["wordpress_content","wordpress_publish","wordpress_draft","wordpress_taxonomy"]}+```++Use this recipe for the user's requested WordPress content work in Act/Dev.+It covers posts, pages, REST-enabled custom post types, and their categories,+tags, or registered taxonomies. It does not authorize settings, plugins, users,+commerce, or unrelated mutations. Loading this skill grants no permission and+adds no tools. Use the existing `fetch_url`; do not build an authentication+bridge, install an authentication plugin, or create an application password.++## Eligibility and permission++Prefer the REST API before editing the UI when the required fields are supported,+the current signed-in session works, and API mutations are already authorized+by the current WebBrain permission state. An existing conversation, run, or+persistent API grant is sufficient: do not ask again. The user's requested+outcome still bounds every write; permission to use APIs is not permission to+publish a draft the user only asked to prepare. Ask mode must not mutate.++If read-only discovery confirms a viable API route but mutations are not+authorized, ask once for `/allow-api`. Do not issue a trial write or repeat the+request after refusal. Use the editor if the user declines, prefers the UI, or+the API is unsuitable. A revoked grant supersedes an earlier permission note.+Before a write, describe the destination, method, and intended payload without+credentials. Do not use GET URLs to create or publish content.++**Strict secret handling overrides this recipe.** When it is enabled, use the+editor without fetching a REST nonce or constructing credential-bearing tool+arguments. Do not automatically ask the user to turn the setting off.+This is an instruction-only integration: outside strict mode, the REST nonce+returned by `fetch_url` and the `X-WP-Nonce` header in subsequent tool arguments+can enter the configured LLM conversation and, when recording is enabled,+local traces. Never copy the nonce into a URL, final answer, scratchpad, skill+text, memory, or scheduled instructions.++## Discover the site, session, and content type++1. Start from the actual WordPress admin tab and intended site. Preserve its+ installation/subsite path (for example `/blog/`) and the current `post_type`+ and `post=<id>`. A saved draft or auto-draft already has an ID: reuse it.+ Before API editing, reconcile unsaved UI changes with the saved record and+ the requested edit. If they cannot be read/preserved, continue in the editor.+2. Discover the REST root from the site's API link or API index using read-only+ `fetch_url`. On a known WordPress installation, try its `wp-json/` index;+ if unavailable, its `?rest_route=/` index. Do not assume root installation,+ pretty permalinks, or that HTTP 200 alone proves a working REST API. Confirm+ WordPress JSON, namespaces, and routes. With query-form roots, append the+ route inside `rest_route` and keep other parameters separate, e.g.+ `/blog/?rest_route=/wp/v2/types&context=edit`; do not append to the whole URL.+3. Use only the same HTTPS origin as the intended admin site for this cookie+ recipe. `fetch_url` uses the current tab's session cookies for eligible+ requests, but browsers/site policy can still prevent authentication. Never+ forward a nonce or cookies to another origin or follow a login redirect as+ proof of authentication. A cross-origin REST root needs a different supported+ auth flow; fall back to the UI here.+4. With strict mode off, GET the current installation's+ `wp-admin/admin-ajax.php?action=rest-nonce`. WordPress core provides this to+ logged-in sessions. The trimmed response must be a nonce, not empty, `0`,+ `-1`, a login page, or an error. Send it only in `X-WP-Nonce` on subsequent+ requests to that site's discovered REST root. Cookies alone are insufficient.+5. Confirm the session with an authenticated read such as+ `wp/v2/users/me?context=edit`; check the user and relevant capabilities.+ GET `wp/v2/types/<post_type>?context=edit` and the API index route schema to+ resolve `rest_namespace`, `rest_base`, supported write methods and fields.+ Confirm create/edit/publish capabilities for the requested operation; for an+ existing ID, GET its item with `context=edit`. Never test access by creating+ disposable content. A page maps to `pages`, while custom types may use another+ namespace/base: never silently replace them with `posts`.+6. Check all requested fields before writing: title, content/block markup,+ excerpt, slug, parent, author, dates, status, featured media, and any relevant+ custom fields. Preserve fields outside the requested change by omitting them.+ If required builder data/meta is not exposed, a custom controller does not+ support the recipe, or the role cannot perform the work, use the editor.++Keep reads bounded with `_fields` where practical. A truncated `fetch_url`+result is incomplete evidence: read its remaining window or narrow the fields+before interpreting JSON, verifying long content, or concluding that no match+exists. Do not resend a mutation just to obtain another response window.++## Resolve categories and tags++Read `wp/v2/taxonomies?type=<post_type>&context=edit` and its route schema.+Use each supported taxonomy's actual namespace/base and the corresponding item+field; do not send `categories`/`tags` to pages or custom types that lack them.+Search the applicable term collection, inspect exact name/slug (and parent for+hierarchical categories), and reuse numeric IDs. Search is not exact matching;+read further pages if needed. Preserve existing term assignments unless the user+requested replacement/removal; arrays replace the whole assignment, so additions+must include the existing IDs. Create a missing term only when required by the+requested categorization and permitted by the user's role. On `term_exists`,+read and validate the existing term. On an uncertain term write, search/reconcile+before retrying. Do not change unrelated taxonomy definitions.++## Write, verify, then publish the same record++- Existing record: GET its current editable state, then POST only the requested+ changes to the discovered item URL ending in its ID. Keep the existing status+ unless the user asked to change it; never demote an existing published item+ to a draft just to follow the new-content recipe. Changes to a published item+ are immediately public. If the user wants only an unpublished proposed edit,+ use an available draft/revision workflow instead of overwriting the live item.+- New record with no existing ID: create **once**, with `status: "draft"`, on+ the discovered collection. Keep the returned ID and item URL immediately.+ Apply the requested fields and resolved taxonomy IDs to this same record.+- GET the item with `context=edit`. Compare saved title/content, relevant fields,+ taxonomy IDs, and intended status. Server filtering, missing fields, or a+ truncated response is not verification. Resolve differences before publishing.+- Only if the user requested publication, POST `{"status":"publish"}` to+ the **same ID** after verification. Respect a requested schedule/private+ status instead. GET again and verify status and returned permalink; for+ public publication also read the live content. `pending`, `future`, and+ `draft` are not `publish`. Report the actual state and URL.+- Refresh/re-read the editor before further UI writes so a stale editor cannot+ overwrite the API result. Keep the same ID when switching surfaces.++## Failures and uncertain results++An HTTP error, login HTML, blocked REST route, missing session, or unsupported+field should trigger a bounded diagnosis and editor fallback, not a retry loop+or plugin installation. For `rest_cookie_invalid_nonce`, refresh the nonce at+most once and verify the session with a read before deciding whether to retry.+Do not retry a definite permission/capability refusal with another endpoint.++A timeout, connection loss, malformed/truncated response, or server error after+a write can mean the write **succeeded**. Reconcile before any further mutation+or creating content in the editor. For a known ID, GET that same item. After an+uncertain creation without an ID, inspect recent records of the same type,+including drafts/pending/published states within the current user's access;+compare author, time, title, content, slug, and taxonomy. A slug/search miss or+one empty page is not proof of no creation. Read candidate items and reuse the+matching ID. WordPress core does not promise an idempotency key for creation.+If the result remains ambiguous, report the uncertain partial outcome and ask+the user to resolve it; **do not create another record or blindly replay**.++When the API cannot complete the task and its write state is known, continue+with Gutenberg Options → Code editor (not a Code block), an existing+Classic/TinyMCE Text/Kod tab, or an observed page-builder switch to the standard+editor. Save/preserve content, markup, taxonomy, type, and ID; get fresh AX refs.+Only try `classic-editor` URLs when supported, preserving `post_type` and other+parameters. Do not install/activate a plugin or change site-wide editor settings+without explicit user authorization. Verify the saved/published outcome.++## Example fetch_url arguments++These are templates, not URLs or IDs to use blindly. Substitute the actual+same-origin `ADMIN_URL`, discovered `COLLECTION_URL`, `NONCE`, and the `ITEM_URL`+for the existing/returned ID. `ITEM_READ_URL` is that item URL with `context=edit`.+For a query-form root, examples are `/blog/?rest_route=/wp/v2/posts/42` and+`/blog/?rest_route=/wp/v2/posts/42&context=edit`; do not append `/42` after other+query parameters. The category/tag example applies only to a+type that supports both fields, after resolving IDs 7 and 12 on that site.++Read the session nonce (strict mode off):++```json+{"url":"ADMIN_URL/admin-ajax.php?action=rest-nonce","method":"GET"}+```++Create only when there is no existing record:++```json+{"url":"COLLECTION_URL","method":"POST","headers":{"X-WP-Nonce":"NONCE","Content-Type":"application/json"},"body":"{\"title\":\"Example title\",\"content\":\"<p>Example content.</p>\",\"status\":\"draft\",\"categories\":[7],\"tags\":[12]}"}+```++Update an existing draft instead of creating another (omitted fields survive):++```json+{"url":"ITEM_URL","method":"POST","headers":{"X-WP-Nonce":"NONCE","Content-Type":"application/json"},"body":"{\"content\":\"<p>Updated content.</p>\"}"}+```++Verify the saved record, including after an uncertain update:++```json+{"url":"ITEM_READ_URL","method":"GET","headers":{"X-WP-Nonce":"NONCE"}}+```++After content/taxonomy verification and only when publication is requested:++```json+{"url":"ITEM_URL","method":"POST","headers":{"X-WP-Nonce":"NONCE","Content-Type":"application/json"},"body":"{\"status\":\"publish\"}"}+```++Repeat the item GET to verify `status` and `link`, then read the public permalink.++## References++- [Cookie authentication and X-WP-Nonce](https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/)+- [Core REST nonce action](https://developer.wordpress.org/reference/functions/wp_ajax_rest_nonce/)+- [API discovery](https://developer.wordpress.org/rest-api/using-the-rest-api/discovery/)+- [Posts and fields](https://developer.wordpress.org/rest-api/reference/posts/)+- [REST support for custom types and taxonomies](https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-rest-api-support-for-custom-content-types/)diff --git a/src/chrome/src/agent/adapters.js b/src/chrome/src/agent/adapters.jsindex fba21f5f1..5fa07a5d7 100644--- a/src/chrome/src/agent/adapters.js+++ b/src/chrome/src/agent/adapters.js@@ -16439,10 +16439,10 @@ const ADAPTERS = [// standardized across virtually every WP install.name: 'wordpress',category: 'general',- matches: (url) => /^https?:\/\/[^/]+\/(wp-admin|wp-login\.php)(\/|$|\?)/.test(url),+ 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.+- For requested WordPress posts/pages/REST-enabled custom types and taxonomy, prefer API first when required fields and session work, API mutations are allowed, and Strict secret handling is off. If available, load \`wordpress-rest-api\` only for this content work. Without skills: use \`fetch_url\` to discover the same-origin REST root/type endpoint; GET the installation's \`wp-admin/admin-ajax.php?action=rest-nonce\`, send its nonce in \`X-WP-Nonce\`, and verify authenticated access/fields before writing. If only API permission is missing, ask once for \`/allow-api\`; never re-ask an existing grant. Ask mode never writes. Strict mode skips nonce fetching and uses UI; do not suggest disabling it. Reuse the current ID, preserve type/content/taxonomy, create new items as drafts, verify before publishing the same ID only if requested. Reconcile uncertain writes before retrying or creating in UI; stop if unresolved. Nonce values can enter model context/traces; never put them in URLs or summaries.+- If API is unsuitable or declined, or Gutenberg's canvas blocks writing, try Gutenberg Options → Code editor (Kod düzenleyicisi, NOT a Code block), an existing Classic/TinyMCE Text/Kod tab, or an observed page-builder switch to the standard editor. Preserve unsaved content/block markup and taxonomy; save/verify the draft before navigation and read fresh AX refs after switching. For supported Classic Editor, append \`classic-editor\` without dropping \`post_type\` or other parameters: \`/wp-admin/post-new.php?post_type=page&classic-editor\`, or \`/wp-admin/post-new.php?classic-editor\` for posts. Saved items keep \`/wp-admin/post.php?post=<id>&action=edit&classic-editor\`. Retain the installation path. If Gutenberg remains, use Code editor. Do not install/activate plugins or change site-wide editor settings without explicit authorization. Never treat GET URLs as a way to create/publish; verify saved status and live content after editor submission or authorized REST publication.- "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.diff --git a/src/chrome/src/agent/agent.js b/src/chrome/src/agent/agent.jsindex 8d87d3f55..87c24b009 100644--- a/src/chrome/src/agent/agent.js+++ b/src/chrome/src/agent/agent.js@@ -9253,7 +9253,7 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout d// setting or /allow-api enables it. Inject only once per "allowed run" to// avoid bloating every subsequent turn.if (this.isApiMutationsAllowed(tabId) && !this.apiAllowedInjected.has(tabId)) {- contextLine += `[USER OVERRIDE — API MUTATIONS ALLOWED: The user has authorized API mutations (POST/PUT/PATCH/DELETE via fetch_url or research_url). The default UI-first rule still applies — reach for the API when UI has failed/is genuinely unworkable, or when WebBrain reports a [BULK API MUTATION PATTERN] for repeated successful same-kind UI actions. Before any destructive API call (anything that creates, deletes, transfers, or charges), state the URL, method, and payload in plain text in your response so the user can see what you're about to do.]\n\n`;+ contextLine += `[USER OVERRIDE — API MUTATIONS ALLOWED: The user has authorized API mutations (POST/PUT/PATCH/DELETE via fetch_url or research_url). For WordPress posts, pages, REST-enabled custom types and their taxonomy, prefer the API first when the required fields and signed-in session are verified and Strict secret handling is off; follow the WordPress adapter/skill and reconcile uncertain writes before retrying. Other tasks retain the UI-first rule. You may also reach for the API when UI has failed/is genuinely unworkable, or when WebBrain reports a [BULK API MUTATION PATTERN] for repeated successful same-kind UI actions. Before any destructive API call (anything that creates, deletes, transfers, or charges), state the URL, method, and payload in plain text in your response so the user can see what you're about to do.]\n\n`;this.apiAllowedInjected.add(tabId);}diff --git a/src/chrome/src/agent/planner.js b/src/chrome/src/agent/planner.jsindex d4f4db262..fac127cf1 100644--- a/src/chrome/src/agent/planner.js+++ b/src/chrome/src/agent/planner.js@@ -280,6 +280,8 @@ export const ASK_MODE_HANDOFF_RESPONSE_JSON_SCHEMA = {required: ['mode_handoff'],};+export const PLANNER_WORDPRESS_API_RULE = '- API mutations are authorized. For WordPress posts, pages, REST-enabled custom types and their taxonomy, prefer the API first when the required fields and signed-in session are verified and Strict secret handling is off; follow the WordPress adapter/skill and reconcile uncertain writes before retrying. Other tasks retain the UI-first rule. Load wordpress-rest-api only for relevant content work when it is available; Compact uses adapter guidance without skills. Do not request /allow-api again or treat API permission as permission to publish.';+export const PLANNER_API_REPLAY_RULE = '- Because API mutations are authorized, repeated same-kind UI mutations may include a conditional API branch: if WebBrain later reports a [BULK API MUTATION PATTERN], sample exactly one fetch_url replay with the provided replayRequestId. If that sample fails with success:false or HTTP 4xx/5xx, stop using API for that request shape and continue through the paced visible-UI loop.';// Keep response-only routing identical across the full Plan-before-Act planner@@ -630,7 +632,7 @@ export function formatResponseLanguagePolicyInstruction(value, fallbackLocale =const PLANNER_RESUME_RULE = '\n- This run is an app-owned scheduled continuation. Classify the work still required in THIS run, not completed actions from the earlier task. First inspect the external event. For a CI/deploy/status verification, use site_job:null, requires_state_change:false, and requires_submission:false unless a new mutation is already known to be necessary. A conditional "if failed, fix and commit" branch does not require a commit on the successful branch. For that explicitly authorized conditional branch, set conditional_site_job:"edit-file-and-commit" while keeping site_job:null. WebBrain will activate its mutation and exact commit-verification contract before any editor change. Use conditional_site_job:null when no such branch is authorized. Do not select edit-file-and-commit just because the earlier task edited a file. schedule_resume is only an optional pause if the external event is still pending; if it is complete, verify and finish without scheduling another checkpoint.';export function buildPlannerSystemPrompt(opts = {}) {- let prompt = opts.allowApi ? `${PLANNER_SYSTEM_PROMPT}\n${PLANNER_API_REPLAY_RULE}` : PLANNER_SYSTEM_PROMPT;+ let prompt = opts.allowApi ? `${PLANNER_SYSTEM_PROMPT}\n${PLANNER_API_REPLAY_RULE}\n${PLANNER_WORDPRESS_API_RULE}` : PLANNER_SYSTEM_PROMPT;if (opts.scheduledResume === true) prompt += PLANNER_RESUME_RULE;prompt += `\n- Requested wbLocale for localized display fields: ${normalizePlannerLocale(opts.locale)}.`;if (opts.researchEscalationEnabled === true) {diff --git a/src/chrome/src/agent/skills.js b/src/chrome/src/agent/skills.jsindex 2d8f51ff8..e9673cb8b 100644--- a/src/chrome/src/agent/skills.js+++ b/src/chrome/src/agent/skills.js@@ -66,6 +66,11 @@ export const PACKAGED_SKILL_SOURCES = Object.freeze([name: 'Turkish deasciifier',path: 'skills/turkish-deasciifier.md',}),+ Object.freeze({+ id: 'wordpress-rest-api',+ name: 'WordPress REST API',+ path: 'skills/wordpress-rest-api.md',+ }),Object.freeze({id: 'phonr-calls',name: 'Phone calls (Phonr)',@@ -77,6 +82,7 @@ export const DEFAULT_SKILL_SOURCES = Object.freeze('freeskillz-xyz','otp-verification-code-helper','humanizer',+ 'wordpress-rest-api',].includes(source.id)));diff --git a/src/chrome/src/agent/tools.js b/src/chrome/src/agent/tools.jsindex 96b22d392..4a4232c8d 100644--- a/src/chrome/src/agent/tools.js+++ b/src/chrome/src/agent/tools.js@@ -2180,8 +2180,8 @@ UI vs API — read this carefully:- For ANY action that creates, modifies, deletes, sends, submits, buys, transfers, posts, or publishes anything: ALWAYS go through the visible UI of the current page by default. NEVER call REST/GraphQL/API endpoints directly via \`fetch_url\` with POST/PUT/PATCH/DELETE unless one of the explicit exceptions below applies.- The user wants to see what's happening. They want to verify before clicking the final button. They want the action to look exactly like a human did it through the page, not like a script ran in the background. UI flows also generally Just Work with the user's existing session, while API endpoints often require separate tokens the user hasn't configured.- TWO exceptions where API mutations are allowed:- (1) The user explicitly says "use the API" or "call the endpoint directly" or "POST to /foo" in their message — do what they asked.- (2) The [USER OVERRIDE — API MUTATIONS ALLOWED] context note is present. It can come from /allow-api for this conversation or the user's persistent setting. When present, you may use API mutations when UI is genuinely failing/unworkable, or when WebBrain reports a [BULK API MUTATION PATTERN] showing repeated successful same-kind UI actions and matching background API requests. Without this authorization, mutating fetch_url/research_url calls are blocked. Before any destructive API call (anything that creates, deletes, transfers, or charges money), state the URL, method, and payload in plain text in your response so the user can see what you're about to do.+ (1) The user explicitly says "use the API" or "call the endpoint directly" or "POST to /foo" in their message — do what they asked once API mutation permission is enabled; an explicit request does not bypass the runtime permission gate.+ (2) The [USER OVERRIDE — API MUTATIONS ALLOWED] context note is present. It can come from /allow-api for this conversation or the user's persistent setting. When present, for WordPress posts, pages, REST-enabled custom types and their taxonomy, prefer the API first when the required fields and signed-in session are verified and Strict secret handling is off; follow the WordPress adapter/skill and reconcile uncertain writes before retrying. Other tasks retain the UI-first rule. You may also use API mutations when UI is genuinely failing/unworkable, or when WebBrain reports a [BULK API MUTATION PATTERN] showing repeated successful same-kind UI actions and matching background API requests. Without this authorization, mutating fetch_url/research_url calls are blocked. Before any destructive API call (anything that creates, deletes, transfers, or charges money), state the URL, method, and payload in plain text in your response so the user can see what you're about to do.- For READING data (looking things up, fetching a README, comparing prices across sites, checking a status page, gathering research), \`fetch_url\` and \`research_url\` are the RIGHT tool. Reading is not the same as acting.- Examples of the rule:- "Create a release on GitHub" → navigate to /releases/new, click the button, fill the form, click Publish. Don't POST to api.github.com/repos/.../releases.@@ -2470,7 +2470,7 @@ FORMS & MODALS:IFRAMES & UI-vs-API:- Cross-origin iframes (Stripe, payment widgets, embedded forms) are NOT a blocker. Start with iframe_read to enumerate labels and matchIndex values; iframe_click/type fail closed on ambiguity. If the embed remains hard to target and no fields have been changed, use promote_iframe({urlFilter}) to load it standalone in the current run tab. After iframe form edits, call verify_form({urlFilter}) and compare labels/values before done, even when the user will submit later.-- For anything that creates, modifies, deletes, sends, submits, buys, transfers, or posts: go through the visible UI unless API mutations are authorized and either UI is failing/unworkable or WebBrain reports a [BULK API MUTATION PATTERN]. Do NOT call REST/GraphQL endpoints via fetch_url or research_url with POST/PUT/PATCH/DELETE without that authorization. Reading data (fetch_url / research_url GET) is fine.+- For anything that creates, modifies, deletes, sends, submits, buys, transfers, or posts: go through the visible UI unless API mutations are authorized and either the WordPress content exception applies, UI is failing/unworkable, or WebBrain reports a [BULK API MUTATION PATTERN]. For WordPress posts, pages, REST-enabled custom types and their taxonomy, prefer the API first when the required fields and signed-in session are verified and Strict secret handling is off; follow the WordPress adapter/skill and reconcile uncertain writes before retrying. Other tasks retain the UI-first rule. Do NOT call REST/GraphQL endpoints via fetch_url or research_url with POST/PUT/PATCH/DELETE without that authorization. Reading data (fetch_url / research_url GET) is fine.SCRATCHPAD & DON'T REDO WORK:- On long tasks, scratchpad_write({text}) pins miscellaneous facts (IDs, plans) that survive context summarization; downloads are auto-pinned for you (scan the \`[auto]\` lines for downloadIds). Keep entries short and factual.diff --git a/src/firefox/skills/wordpress-rest-api.md b/src/firefox/skills/wordpress-rest-api.mdnew file mode 100644index 000000000..075748940--- /dev/null+++ b/src/firefox/skills/wordpress-rest-api.md@@ -0,0 +1,194 @@+# WordPress REST API++```webbrain-skill+{"summary":"Create, edit, and publish WordPress posts, pages, REST-enabled content types and their categories/tags through the authorized REST API before editor fallback.","modes":["act","dev"],"intents":["wordpress_content","wordpress_publish","wordpress_draft","wordpress_taxonomy"]}+```++Use this recipe for the user's requested WordPress content work in Act/Dev.+It covers posts, pages, REST-enabled custom post types, and their categories,+tags, or registered taxonomies. It does not authorize settings, plugins, users,+commerce, or unrelated mutations. Loading this skill grants no permission and+adds no tools. Use the existing `fetch_url`; do not build an authentication+bridge, install an authentication plugin, or create an application password.++## Eligibility and permission++Prefer the REST API before editing the UI when the required fields are supported,+the current signed-in session works, and API mutations are already authorized+by the current WebBrain permission state. An existing conversation, run, or+persistent API grant is sufficient: do not ask again. The user's requested+outcome still bounds every write; permission to use APIs is not permission to+publish a draft the user only asked to prepare. Ask mode must not mutate.++If read-only discovery confirms a viable API route but mutations are not+authorized, ask once for `/allow-api`. Do not issue a trial write or repeat the+request after refusal. Use the editor if the user declines, prefers the UI, or+the API is unsuitable. A revoked grant supersedes an earlier permission note.+Before a write, describe the destination, method, and intended payload without+credentials. Do not use GET URLs to create or publish content.++**Strict secret handling overrides this recipe.** When it is enabled, use the+editor without fetching a REST nonce or constructing credential-bearing tool+arguments. Do not automatically ask the user to turn the setting off.+This is an instruction-only integration: outside strict mode, the REST nonce+returned by `fetch_url` and the `X-WP-Nonce` header in subsequent tool arguments+can enter the configured LLM conversation and, when recording is enabled,+local traces. Never copy the nonce into a URL, final answer, scratchpad, skill+text, memory, or scheduled instructions.++## Discover the site, session, and content type++1. Start from the actual WordPress admin tab and intended site. Preserve its+ installation/subsite path (for example `/blog/`) and the current `post_type`+ and `post=<id>`. A saved draft or auto-draft already has an ID: reuse it.+ Before API editing, reconcile unsaved UI changes with the saved record and+ the requested edit. If they cannot be read/preserved, continue in the editor.+2. Discover the REST root from the site's API link or API index using read-only+ `fetch_url`. On a known WordPress installation, try its `wp-json/` index;+ if unavailable, its `?rest_route=/` index. Do not assume root installation,+ pretty permalinks, or that HTTP 200 alone proves a working REST API. Confirm+ WordPress JSON, namespaces, and routes. With query-form roots, append the+ route inside `rest_route` and keep other parameters separate, e.g.+ `/blog/?rest_route=/wp/v2/types&context=edit`; do not append to the whole URL.+3. Use only the same HTTPS origin as the intended admin site for this cookie+ recipe. `fetch_url` uses the current tab's session cookies for eligible+ requests, but browsers/site policy can still prevent authentication. Never+ forward a nonce or cookies to another origin or follow a login redirect as+ proof of authentication. A cross-origin REST root needs a different supported+ auth flow; fall back to the UI here.+4. With strict mode off, GET the current installation's+ `wp-admin/admin-ajax.php?action=rest-nonce`. WordPress core provides this to+ logged-in sessions. The trimmed response must be a nonce, not empty, `0`,+ `-1`, a login page, or an error. Send it only in `X-WP-Nonce` on subsequent+ requests to that site's discovered REST root. Cookies alone are insufficient.+5. Confirm the session with an authenticated read such as+ `wp/v2/users/me?context=edit`; check the user and relevant capabilities.+ GET `wp/v2/types/<post_type>?context=edit` and the API index route schema to+ resolve `rest_namespace`, `rest_base`, supported write methods and fields.+ Confirm create/edit/publish capabilities for the requested operation; for an+ existing ID, GET its item with `context=edit`. Never test access by creating+ disposable content. A page maps to `pages`, while custom types may use another+ namespace/base: never silently replace them with `posts`.+6. Check all requested fields before writing: title, content/block markup,+ excerpt, slug, parent, author, dates, status, featured media, and any relevant+ custom fields. Preserve fields outside the requested change by omitting them.+ If required builder data/meta is not exposed, a custom controller does not+ support the recipe, or the role cannot perform the work, use the editor.++Keep reads bounded with `_fields` where practical. A truncated `fetch_url`+result is incomplete evidence: read its remaining window or narrow the fields+before interpreting JSON, verifying long content, or concluding that no match+exists. Do not resend a mutation just to obtain another response window.++## Resolve categories and tags++Read `wp/v2/taxonomies?type=<post_type>&context=edit` and its route schema.+Use each supported taxonomy's actual namespace/base and the corresponding item+field; do not send `categories`/`tags` to pages or custom types that lack them.+Search the applicable term collection, inspect exact name/slug (and parent for+hierarchical categories), and reuse numeric IDs. Search is not exact matching;+read further pages if needed. Preserve existing term assignments unless the user+requested replacement/removal; arrays replace the whole assignment, so additions+must include the existing IDs. Create a missing term only when required by the+requested categorization and permitted by the user's role. On `term_exists`,+read and validate the existing term. On an uncertain term write, search/reconcile+before retrying. Do not change unrelated taxonomy definitions.++## Write, verify, then publish the same record++- Existing record: GET its current editable state, then POST only the requested+ changes to the discovered item URL ending in its ID. Keep the existing status+ unless the user asked to change it; never demote an existing published item+ to a draft just to follow the new-content recipe. Changes to a published item+ are immediately public. If the user wants only an unpublished proposed edit,+ use an available draft/revision workflow instead of overwriting the live item.+- New record with no existing ID: create **once**, with `status: "draft"`, on+ the discovered collection. Keep the returned ID and item URL immediately.+ Apply the requested fields and resolved taxonomy IDs to this same record.+- GET the item with `context=edit`. Compare saved title/content, relevant fields,+ taxonomy IDs, and intended status. Server filtering, missing fields, or a+ truncated response is not verification. Resolve differences before publishing.+- Only if the user requested publication, POST `{"status":"publish"}` to+ the **same ID** after verification. Respect a requested schedule/private+ status instead. GET again and verify status and returned permalink; for+ public publication also read the live content. `pending`, `future`, and+ `draft` are not `publish`. Report the actual state and URL.+- Refresh/re-read the editor before further UI writes so a stale editor cannot+ overwrite the API result. Keep the same ID when switching surfaces.++## Failures and uncertain results++An HTTP error, login HTML, blocked REST route, missing session, or unsupported+field should trigger a bounded diagnosis and editor fallback, not a retry loop+or plugin installation. For `rest_cookie_invalid_nonce`, refresh the nonce at+most once and verify the session with a read before deciding whether to retry.+Do not retry a definite permission/capability refusal with another endpoint.++A timeout, connection loss, malformed/truncated response, or server error after+a write can mean the write **succeeded**. Reconcile before any further mutation+or creating content in the editor. For a known ID, GET that same item. After an+uncertain creation without an ID, inspect recent records of the same type,+including drafts/pending/published states within the current user's access;+compare author, time, title, content, slug, and taxonomy. A slug/search miss or+one empty page is not proof of no creation. Read candidate items and reuse the+matching ID. WordPress core does not promise an idempotency key for creation.+If the result remains ambiguous, report the uncertain partial outcome and ask+the user to resolve it; **do not create another record or blindly replay**.++When the API cannot complete the task and its write state is known, continue+with Gutenberg Options → Code editor (not a Code block), an existing+Classic/TinyMCE Text/Kod tab, or an observed page-builder switch to the standard+editor. Save/preserve content, markup, taxonomy, type, and ID; get fresh AX refs.+Only try `classic-editor` URLs when supported, preserving `post_type` and other+parameters. Do not install/activate a plugin or change site-wide editor settings+without explicit user authorization. Verify the saved/published outcome.++## Example fetch_url arguments++These are templates, not URLs or IDs to use blindly. Substitute the actual+same-origin `ADMIN_URL`, discovered `COLLECTION_URL`, `NONCE`, and the `ITEM_URL`+for the existing/returned ID. `ITEM_READ_URL` is that item URL with `context=edit`.+For a query-form root, examples are `/blog/?rest_route=/wp/v2/posts/42` and+`/blog/?rest_route=/wp/v2/posts/42&context=edit`; do not append `/42` after other+query parameters. The category/tag example applies only to a+type that supports both fields, after resolving IDs 7 and 12 on that site.++Read the session nonce (strict mode off):++```json+{"url":"ADMIN_URL/admin-ajax.php?action=rest-nonce","method":"GET"}+```++Create only when there is no existing record:++```json+{"url":"COLLECTION_URL","method":"POST","headers":{"X-WP-Nonce":"NONCE","Content-Type":"application/json"},"body":"{\"title\":\"Example title\",\"content\":\"<p>Example content.</p>\",\"status\":\"draft\",\"categories\":[7],\"tags\":[12]}"}+```++Update an existing draft instead of creating another (omitted fields survive):++```json+{"url":"ITEM_URL","method":"POST","headers":{"X-WP-Nonce":"NONCE","Content-Type":"application/json"},"body":"{\"content\":\"<p>Updated content.</p>\"}"}+```++Verify the saved record, including after an uncertain update:++```json+{"url":"ITEM_READ_URL","method":"GET","headers":{"X-WP-Nonce":"NONCE"}}+```++After content/taxonomy verification and only when publication is requested:++```json+{"url":"ITEM_URL","method":"POST","headers":{"X-WP-Nonce":"NONCE","Content-Type":"application/json"},"body":"{\"status\":\"publish\"}"}+```++Repeat the item GET to verify `status` and `link`, then read the public permalink.++## References++- [Cookie authentication and X-WP-Nonce](https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/)+- [Core REST nonce action](https://developer.wordpress.org/reference/functions/wp_ajax_rest_nonce/)+- [API discovery](https://developer.wordpress.org/rest-api/using-the-rest-api/discovery/)+- [Posts and fields](https://developer.wordpress.org/rest-api/reference/posts/)+- [REST support for custom types and taxonomies](https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-rest-api-support-for-custom-content-types/)diff --git a/src/firefox/src/agent/adapters.js b/src/firefox/src/agent/adapters.jsindex d54096541..d23939913 100644--- a/src/firefox/src/agent/adapters.js+++ b/src/firefox/src/agent/adapters.js@@ -16437,10 +16437,10 @@ const ADAPTERS = [// standardized across virtually every WP install.name: 'wordpress',category: 'general',- matches: (url) => /^https?:\/\/[^/]+\/(wp-admin|wp-login\.php)(\/|$|\?)/.test(url),+ 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.+- For requested WordPress posts/pages/REST-enabled custom types and taxonomy, prefer API first when required fields and session work, API mutations are allowed, and Strict secret handling is off. If available, load \`wordpress-rest-api\` only for this content work. Without skills: use \`fetch_url\` to discover the same-origin REST root/type endpoint; GET the installation's \`wp-admin/admin-ajax.php?action=rest-nonce\`, send its nonce in \`X-WP-Nonce\`, and verify authenticated access/fields before writing. If only API permission is missing, ask once for \`/allow-api\`; never re-ask an existing grant. Ask mode never writes. Strict mode skips nonce fetching and uses UI; do not suggest disabling it. Reuse the current ID, preserve type/content/taxonomy, create new items as drafts, verify before publishing the same ID only if requested. Reconcile uncertain writes before retrying or creating in UI; stop if unresolved. Nonce values can enter model context/traces; never put them in URLs or summaries.+- If API is unsuitable or declined, or Gutenberg's canvas blocks writing, try Gutenberg Options → Code editor (Kod düzenleyicisi, NOT a Code block), an existing Classic/TinyMCE Text/Kod tab, or an observed page-builder switch to the standard editor. Preserve unsaved content/block markup and taxonomy; save/verify the draft before navigation and read fresh AX refs after switching. For supported Classic Editor, append \`classic-editor\` without dropping \`post_type\` or other parameters: \`/wp-admin/post-new.php?post_type=page&classic-editor\`, or \`/wp-admin/post-new.php?classic-editor\` for posts. Saved items keep \`/wp-admin/post.php?post=<id>&action=edit&classic-editor\`. Retain the installation path. If Gutenberg remains, use Code editor. Do not install/activate plugins or change site-wide editor settings without explicit authorization. Never treat GET URLs as a way to create/publish; verify saved status and live content after editor submission or authorized REST publication.- "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.diff --git a/src/firefox/src/agent/agent.js b/src/firefox/src/agent/agent.jsindex bacf34b0c..0a0d932d8 100644--- a/src/firefox/src/agent/agent.js+++ b/src/firefox/src/agent/agent.js@@ -14477,7 +14477,7 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout d}if (this.isApiMutationsAllowed(tabId) && !this.apiAllowedInjected.has(tabId)) {- contextLine += `[USER OVERRIDE — API MUTATIONS ALLOWED: The user has authorized API mutations (POST/PUT/PATCH/DELETE via fetch_url or research_url). The default UI-first rule still applies — reach for the API when UI has failed/is genuinely unworkable, or when WebBrain reports a [BULK API MUTATION PATTERN] for repeated successful same-kind UI actions. Before any destructive API call, state the URL, method, and payload in plain text in your response so the user can see what you're about to do.]\n\n`;+ contextLine += `[USER OVERRIDE — API MUTATIONS ALLOWED: The user has authorized API mutations (POST/PUT/PATCH/DELETE via fetch_url or research_url). For WordPress posts, pages, REST-enabled custom types and their taxonomy, prefer the API first when the required fields and signed-in session are verified and Strict secret handling is off; follow the WordPress adapter/skill and reconcile uncertain writes before retrying. Other tasks retain the UI-first rule. You may also reach for the API when UI has failed/is genuinely unworkable, or when WebBrain reports a [BULK API MUTATION PATTERN] for repeated successful same-kind UI actions. Before any destructive API call, state the URL, method, and payload in plain text in your response so the user can see what you're about to do.]\n\n`;this.apiAllowedInjected.add(tabId);}diff --git a/src/firefox/src/agent/planner.js b/src/firefox/src/agent/planner.jsindex d4f4db262..fac127cf1 100644--- a/src/firefox/src/agent/planner.js+++ b/src/firefox/src/agent/planner.js@@ -280,6 +280,8 @@ export const ASK_MODE_HANDOFF_RESPONSE_JSON_SCHEMA = {required: ['mode_handoff'],};+export const PLANNER_WORDPRESS_API_RULE = '- API mutations are authorized. For WordPress posts, pages, REST-enabled custom types and their taxonomy, prefer the API first when the required fields and signed-in session are verified and Strict secret handling is off; follow the WordPress adapter/skill and reconcile uncertain writes before retrying. Other tasks retain the UI-first rule. Load wordpress-rest-api only for relevant content work when it is available; Compact uses adapter guidance without skills. Do not request /allow-api again or treat API permission as permission to publish.';+export const PLANNER_API_REPLAY_RULE = '- Because API mutations are authorized, repeated same-kind UI mutations may include a conditional API branch: if WebBrain later reports a [BULK API MUTATION PATTERN], sample exactly one fetch_url replay with the provided replayRequestId. If that sample fails with success:false or HTTP 4xx/5xx, stop using API for that request shape and continue through the paced visible-UI loop.';// Keep response-only routing identical across the full Plan-before-Act planner@@ -630,7 +632,7 @@ export function formatResponseLanguagePolicyInstruction(value, fallbackLocale =const PLANNER_RESUME_RULE = '\n- This run is an app-owned scheduled continuation. Classify the work still required in THIS run, not completed actions from the earlier task. First inspect the external event. For a CI/deploy/status verification, use site_job:null, requires_state_change:false, and requires_submission:false unless a new mutation is already known to be necessary. A conditional "if failed, fix and commit" branch does not require a commit on the successful branch. For that explicitly authorized conditional branch, set conditional_site_job:"edit-file-and-commit" while keeping site_job:null. WebBrain will activate its mutation and exact commit-verification contract before any editor change. Use conditional_site_job:null when no such branch is authorized. Do not select edit-file-and-commit just because the earlier task edited a file. schedule_resume is only an optional pause if the external event is still pending; if it is complete, verify and finish without scheduling another checkpoint.';export function buildPlannerSystemPrompt(opts = {}) {- let prompt = opts.allowApi ? `${PLANNER_SYSTEM_PROMPT}\n${PLANNER_API_REPLAY_RULE}` : PLANNER_SYSTEM_PROMPT;+ let prompt = opts.allowApi ? `${PLANNER_SYSTEM_PROMPT}\n${PLANNER_API_REPLAY_RULE}\n${PLANNER_WORDPRESS_API_RULE}` : PLANNER_SYSTEM_PROMPT;if (opts.scheduledResume === true) prompt += PLANNER_RESUME_RULE;prompt += `\n- Requested wbLocale for localized display fields: ${normalizePlannerLocale(opts.locale)}.`;if (opts.researchEscalationEnabled === true) {diff --git a/src/firefox/src/agent/skills.js b/src/firefox/src/agent/skills.jsindex 7a5fe66a2..5332785b8 100644--- a/src/firefox/src/agent/skills.js+++ b/src/firefox/src/agent/skills.js@@ -66,6 +66,11 @@ export const PACKAGED_SKILL_SOURCES = Object.freeze([name: 'Turkish deasciifier',path: 'skills/turkish-deasciifier.md',}),+ Object.freeze({+ id: 'wordpress-rest-api',+ name: 'WordPress REST API',+ path: 'skills/wordpress-rest-api.md',+ }),Object.freeze({id: 'phonr-calls',name: 'Phone calls (Phonr)',@@ -77,6 +82,7 @@ export const DEFAULT_SKILL_SOURCES = Object.freeze('freeskillz-xyz','otp-verification-code-helper','humanizer',+ 'wordpress-rest-api',].includes(source.id)));diff --git a/src/firefox/src/agent/tools.js b/src/firefox/src/agent/tools.jsindex 125b8034f..ae97f4430 100644--- a/src/firefox/src/agent/tools.js+++ b/src/firefox/src/agent/tools.js@@ -2030,8 +2030,8 @@ UI vs API — read this carefully:- For ANY action that creates, modifies, deletes, sends, submits, buys, transfers, posts, or publishes: ALWAYS go through the visible UI by default. NEVER call REST/GraphQL/API endpoints directly via \`fetch_url\` with POST/PUT/PATCH/DELETE unless one of the explicit exceptions below applies.- The user wants to see what's happening, verify before submission, and have actions look like a human did them through the page. UI flows also work with the user's existing session, while API endpoints often require separate tokens.- TWO exceptions where API mutations are allowed:- (1) The user explicitly says "use the API" or "POST to /foo".- (2) The [USER OVERRIDE — API MUTATIONS ALLOWED] context note is present. It can come from /allow-api for this conversation or the user's persistent setting. When present, you may use API mutations when UI is genuinely failing/unworkable, or when WebBrain reports a [BULK API MUTATION PATTERN] showing repeated successful same-kind UI actions and matching background API requests. Without this authorization, mutating fetch_url/research_url calls are blocked. Before any destructive API call, state the URL, method, and payload in plain text in your response.+ (1) The user explicitly says "use the API" or "POST to /foo" — do what they asked once API mutation permission is enabled; an explicit request does not bypass the runtime permission gate.+ (2) The [USER OVERRIDE — API MUTATIONS ALLOWED] context note is present. It can come from /allow-api for this conversation or the user's persistent setting. When present, for WordPress posts, pages, REST-enabled custom types and their taxonomy, prefer the API first when the required fields and signed-in session are verified and Strict secret handling is off; follow the WordPress adapter/skill and reconcile uncertain writes before retrying. Other tasks retain the UI-first rule. You may also use API mutations when UI is genuinely failing/unworkable, or when WebBrain reports a [BULK API MUTATION PATTERN] showing repeated successful same-kind UI actions and matching background API requests. Without this authorization, mutating fetch_url/research_url calls are blocked. Before any destructive API call, state the URL, method, and payload in plain text in your response.- For READING data (looking things up, fetching a README, comparing prices, checking a status page), \`fetch_url\` and \`research_url\` are the RIGHT tool. Reading is fine.- Examples:- "Create a release on GitHub" → navigate to /releases/new, fill the form, click Publish. NOT a POST to api.github.com.@@ -2228,7 +2228,7 @@ FORMS & MODALS:IFRAMES & UI-vs-API:- Cross-origin iframes (Stripe, payment widgets, embedded forms) are NOT a blocker. Start with iframe_read to enumerate labels and matchIndex values; iframe_click/type fail closed on ambiguity. If the embed remains hard to target and no fields have been changed, use promote_iframe({urlFilter}) to load it standalone in the current run tab. After iframe form edits, call verify_form({urlFilter}) and compare labels/values before done, even when the user will submit later.-- For anything that creates, modifies, deletes, sends, submits, buys, transfers, or posts: go through the visible UI unless API mutations are authorized and either UI is failing/unworkable or WebBrain reports a [BULK API MUTATION PATTERN]. Do NOT call REST/GraphQL endpoints via fetch_url or research_url with POST/PUT/PATCH/DELETE without that authorization. Reading data (fetch_url / research_url GET) is fine.+- For anything that creates, modifies, deletes, sends, submits, buys, transfers, or posts: go through the visible UI unless API mutations are authorized and either the WordPress content exception applies, UI is failing/unworkable, or WebBrain reports a [BULK API MUTATION PATTERN]. For WordPress posts, pages, REST-enabled custom types and their taxonomy, prefer the API first when the required fields and signed-in session are verified and Strict secret handling is off; follow the WordPress adapter/skill and reconcile uncertain writes before retrying. Other tasks retain the UI-first rule. Do NOT call REST/GraphQL endpoints via fetch_url or research_url with POST/PUT/PATCH/DELETE without that authorization. Reading data (fetch_url / research_url GET) is fine.SCRATCHPAD & DON'T REDO WORK:- On long tasks, scratchpad_write({text}) pins miscellaneous facts (IDs, plans) that survive context summarization; downloads are auto-pinned for you (scan the \`[auto]\` lines for downloadIds). Keep entries short and factual.diff --git a/test/run.js b/test/run.jsindex 8bb55c25e..a8cce1e0a 100644--- a/test/run.js+++ b/test/run.js@@ -9433,6 +9433,45 @@ test('matches wordpress wp-admin on any host', () => {assert.equal(getActiveAdapter('https://example.com/blog/wp-admin-tutorial/'), null);});+test('WordPress API and editor guidance reaches every tier on root and subdirectory sites', async () => {+ const savedChrome = globalThis.chrome, savedBrowser = globalThis.browser;+ try {+ globalThis.chrome = globalThis.browser = { tabs: {} };+ let expectedNotes;+ for (const [AgentClass, getAdapter, buildMessages] of [+ [AgentCh, getActiveAdapter, buildPlannerMessages],+ [AgentFx, getActiveAdapterFx, buildPlannerMessagesFx],+ ]) {+ for (const url of ['https://example.com/wp-admin/', 'https://example.com/blog/wp-admin/post-new.php?post_type=page', 'https://example.com/network/site/wp-login.php']) {+ const notes = getAdapter(url)?.notes;+ assert.ok(notes);+ expectedNotes ??= notes;+ assert.equal(notes, expectedNotes, 'browser-specific WordPress guidance drifted');+ assert.equal(notes.trim().split('\n').filter(line => line.startsWith('- ')).length, 8);+ for (const tier of ['compact', 'mid', 'full']) {+ const agent = new AgentClass({ getActive: () => ({ promptTier: tier }) });+ agent.useSiteAdapters = true;+ agent._queueAdapterMatchTrace = () => {};+ chrome.tabs.get = async () => ({ url });+ const messages = [];+ assert.equal(await agent._maybeReinjectAdapter(4974, messages), true);+ assert.match(messages[0].content, /Without skills: use `fetch_url`/);+ assert.match(messages[0].content, /Strict mode skips nonce fetching and uses UI/);+ assert.match(messages[0].content, /Reconcile uncertain writes/);+ assert.match(messages[0].content, /If API is unsuitable or declined/);+ assert.match(messages[0].content, /post_type=page&classic-editor/);+ assert.equal(agent._skillLoaderDefinition('act', tier), null, 'hint must work without installed skills');+ }+ const plan = buildMessages({ role: 'user', content: 'Publish this WordPress page' }, url, 'WordPress', '', { allowApi: true });+ assert.match(plan[0].content, /prefer the API first/);+ }+ for (const url of ['https://example.com/?next=/wp-admin/', 'https://example.com/blog/wp-admin-guide/', 'https://example.com/blog/#/wp-admin/']) {+ assert.notEqual(getAdapter(url)?.name, 'wordpress');+ }+ }+ } finally { globalThis.chrome = savedChrome; globalThis.browser = savedBrowser; }+});+test('routes AWS console tasks through the specific CloudShell adapter', () => {const cloudShellUrls = ['https://us-east-1.console.aws.amazon.com/cloudshell/home?region=us-east-1#',@@ -32000,6 +32039,7 @@ test('every bundled skill declares its canonical semantic intents', () => {'temporary-file-share-litterbox': ['temporary_file_share', 'public_upload_link', 'expiring_file_upload'],'humanizer': ['email_reply', 'draft_message', 'compose_prose', 'rewrite_text', 'humanize_writing', 'reply_to_thread'],'phonr-calls': ['outbound_phone_call', 'phone_inquiry', 'phone_call_status', 'phone_call_result', 'phone_call_recording', 'stop_phone_call'],+ 'wordpress-rest-api': ['wordpress_content', 'wordpress_publish', 'wordpress_draft', 'wordpress_taxonomy'],};for (const [label, prefix, sources, normalizeSkills] of [['chrome', 'src/chrome', PACKAGED_SKILL_SOURCES_CH, normalizeCustomSkillsCh],@@ -32018,6 +32058,191 @@ test('every bundled skill declares its canonical semantic intents', () => {}});+test('WordPress skill loads on demand in Act/Dev Mid/Full and cannot restore itself after removal', () => {+ const contents = [];+ for (const [label, prefix, AgentClass, sources, defaults] of [+ ['chrome', 'src/chrome', AgentCh, PACKAGED_SKILL_SOURCES_CH, DEFAULT_SKILL_SOURCES_CH],+ ['firefox', 'src/firefox', AgentFx, PACKAGED_SKILL_SOURCES_FX, DEFAULT_SKILL_SOURCES_FX],+ ]) {+ const source = sources.find(s => s.id === 'wordpress-rest-api');+ assert.ok(defaults.some(s => s.id === source?.id), `${label}: missing default`);+ const content = fs.readFileSync(path.join(ROOT, prefix, source.path), 'utf8');+ contents.push(content);+ for (const tier of ['compact', 'mid', 'full']) {+ for (const mode of ['ask', 'act', 'dev']) {+ const agent = new AgentClass({ getActive: () => ({ promptTier: tier }) });+ const tabId = 4975;+ agent.setCustomSkills([{ ...source, content, sourceType: 'built-in', sourceUrl: source.path }]);+ agent.conversationModes.set(tabId, mode);+ agent.conversations.set(tabId, [{ role: 'system', content: agent._buildSystemPrompt(mode, tabId) }]);+ assert.doesNotMatch(agent.conversations.get(tabId)[0].content, /Discover the site, session/);+ const eligible = tier !== 'compact' && mode !== 'ask';+ const loader = agent._skillLoaderDefinition(mode, tier);+ assert.equal(!!loader, eligible, `${label}: ${mode}/${tier} catalog eligibility`);+ const result = agent._loadSkillForRun(tabId, { skill_id: source.id });+ assert.equal(result.success, eligible, `${label}: ${mode}/${tier} load eligibility`);+ const prompt = agent.conversations.get(tabId)[0].content;+ assert.equal(prompt.includes('Discover the site, session'), eligible);+ assert.deepEqual(agent._skillToolDefinitions(tabId, mode, tier), [], 'instruction-only skill added tools');+ assert.equal(agent.isApiMutationsAllowed(tabId), false, 'loading a skill granted API access');+ if (eligible) {+ agent.strictSecretMode = true;+ assert.match(agent._buildSystemPrompt(mode, tabId), /Strict secret handling overrides this recipe/);+ assert.match(agent._buildSystemPrompt(mode, tabId), /without fetching a REST nonce/);+ }+ agent.setCustomSkills([]);+ assert.equal(agent._loadSkillForRun(tabId, { skill_id: source.id }).success, false);+ assert.doesNotMatch(agent._buildSystemPrompt(mode, tabId), /Discover the site, session/);+ }+ }+ }+ assert.equal(contents[0], contents[1]);+});++test('WordPress default seeding respects stored removal on startup and restart', async () => {+ for (const prefix of ['src/chrome', 'src/firefox']) {+ const mod = await import(pathToFileURL(path.join(ROOT, prefix, 'src/agent/skills.js')).href);+ const background = fs.readFileSync(path.join(ROOT, prefix, 'src/background.js'), 'utf8');+ const start = background.indexOf('async function loadCustomSkills()');+ const end = background.indexOf('const customSkillsReady =', start);+ assert.ok(start >= 0 && end > start);+ for (const removed of [false, true]) {+ const state = { customSkills: [], defaultSkillsSeeded: true, defaultSkillsRemoved: removed ? ['wordpress-rest-api'] : [] };+ let installed = [];+ const bindings = {+ ...mod,+ chrome: { storage: { local: { get: async () => state, set: async update => Object.assign(state, update) } } },+ agent: { setCustomSkills: skills => { installed = skills; } },+ loadPackagedSkillRecords: async sources => sources.map(source => ({+ ...source, sourceType: 'built-in', sourceUrl: source.path,+ content: fs.readFileSync(path.join(ROOT, prefix, source.path), 'utf8'),+ })),+ refreshPackagedSkillRecords: async skills => ({ skills, changed: false }),+ };+ bindings.browser = bindings.chrome;+ const load = Function(...Object.keys(bindings), `${background.slice(start, end)}\nreturn loadCustomSkills;`)(...Object.values(bindings));+ await load();+ await load();+ assert.equal(installed.filter(skill => skill.id === 'wordpress-rest-api').length, removed ? 0 : 1, prefix);+ if (!removed) {+ state.customSkills = state.customSkills.filter(skill => skill.id !== 'wordpress-rest-api');+ state.defaultSkillsRemoved = ['wordpress-rest-api'];+ await load();+ assert.equal(installed.some(skill => skill.id === 'wordpress-rest-api'), false, `${prefix}: removed default returned`);+ }+ }+ }+});++test('WordPress mutation examples obey existing API grants and Ask-mode denial in both builds', async () => {+ for (const [prefix, AgentClass] of [['src/chrome', AgentCh], ['src/firefox', AgentFx]]) {+ const content = fs.readFileSync(path.join(ROOT, prefix, 'skills/wordpress-rest-api.md'), 'utf8');+ const example = [...content.matchAll(/```json\s*\n([\s\S]*?)\n```/g)].map(m => JSON.parse(m[1]))[1];+ for (const approval of ['none', 'conversation', 'persistent', 'ask']) {+ const agent = new AgentClass({ getVisionProvider: async () => null });+ const tabId = 4976;+ let executed = false;+ agent.executeTool = async () => { executed = true; return { success: true, status: 201 }; };+ agent._ensureGateSetting = async () => {};+ agent._skipPermissionGate = true;+ agent.conversationModes.set(tabId, approval === 'ask' ? 'ask' : 'act');+ if (approval === 'conversation' || approval === 'ask') agent.setApiMutationsAllowed(tabId, true);+ if (approval === 'persistent') agent.setAlwaysAllowApiMutations(true);+ const messages = [];+ await agent._executeToolBatch(tabId, [{+ id: 'wp_create', function: { name: 'fetch_url', arguments: JSON.stringify({ ...example, url: 'https://example.com/blog/wp-json/wp/v2/posts' }) },+ }], messages, () => {}, { supportsVision: false }, '', new Set(['fetch_url']), 1, { apiMutationsDenied: approval === 'ask' });+ assert.equal(executed, ['conversation', 'persistent'].includes(approval), `${prefix}: ${approval}`);+ if (!executed) {+ const denied = JSON.parse(messages[0].content);+ assert.equal(denied.denied, true);+ assert.equal(denied.requiresApiAllow, approval === 'none');+ }+ }+ }+});++test('WordPress fetch_url examples preserve cookies, type, ID and taxonomy through verified draft/publication and uncertain writes', async () => {+ const savedFetch = globalThis.fetch;+ const savedChrome = globalThis.chrome, savedBrowser = globalThis.browser;+ try {+ globalThis.chrome = globalThis.browser = { tabs: { get: async () => ({ url: 'https://example.com/blog/wp-admin/post.php?post=42&action=edit' }) } };+ for (const [prefix, fetchUrl] of [['src/chrome', fetchUrlCh], ['src/firefox', fetchUrlFx]]) {+ const content = fs.readFileSync(path.join(ROOT, prefix, 'skills/wordpress-rest-api.md'), 'utf8');+ const templates = [...content.matchAll(/```json\s*\n([\s\S]*?)\n```/g)].map(m => JSON.parse(m[1]));+ for (const [route, queryRoot, existing, uncertain] of [+ ['wp/v2/posts', false, false, false],+ ['wp/v2/pages', false, true, false],+ ['library/v1/books', false, true, true],+ ['wp/v2/posts', true, false, true],+ ]) {+ const collection = queryRoot ? `https://example.com/blog/?rest_route=/${route}` : `https://example.com/blog/wp-json/${route}`;+ const item = `${collection}/42`;+ const readItem = `${item}${queryRoot ? '&' : '?'}context=edit`;+ const nonce = 'test-nonce';+ const examples = templates.map(template => JSON.parse(JSON.stringify(template)+ .replaceAll('ADMIN_URL', 'https://example.com/blog/wp-admin')+ .replaceAll('COLLECTION_URL', collection).replaceAll('ITEM_READ_URL', readItem)+ .replaceAll('ITEM_URL', item).replaceAll('NONCE', nonce)));+ const taxonomies = route === 'wp/v2/posts' ? { categories: [7], tags: [12] } : route === 'library/v1/books' ? { genres: [8] } : {};+ let record = existing ? { id: 42, type: route, title: 'Keep title', content: '<p>Old content.</p>', status: 'draft', ...taxonomies } : null;+ let writes = 0, creations = 0, loseResponse = uncertain;+ const jsonResponse = (data, status = 200) => new Response(JSON.stringify(data), { status, headers: { 'Content-Type': 'application/json' } });+ globalThis.fetch = async (url, init) => {+ assert.equal(init.credentials, 'include', `${prefix}: missing current-tab session`);+ assert.equal(init.redirect, 'manual');+ if (url === examples[0].url) return new Response(nonce, { headers: { 'Content-Type': 'text/html' } });+ assert.equal(init.headers['X-WP-Nonce'], nonce);+ assert.equal(url.includes(nonce), false);+ if (init.method === 'GET') {+ assert.equal(url, readItem);+ return jsonResponse(record);+ }+ writes++;+ const body = JSON.parse(init.body);+ assert.equal(init.headers['Content-Type'], 'application/json');+ if (url === collection) {+ assert.equal(existing, false, 'existing draft must not use the collection create route');+ creations++;+ assert.equal(body.status, 'draft');+ record = { id: 42, type: route, ...body };+ } else {+ assert.equal(url, item);+ assert.ok(record);+ record = { ...record, ...body, link: 'https://example.com/blog/example-title/' };+ }+ if (loseResponse) { loseResponse = false; throw new Error('Response timed out after write'); }+ return jsonResponse(record, url === collection ? 201 : 200);+ };+ const call = args => fetchUrl(args.url, args, { tabId: 4977 });+ assert.equal((await call(examples[0])).text.trim(), nonce);+ const saved = await call(existing ? examples[2] : examples[1]);+ assert.equal(saved.success, !uncertain);+ const verified = JSON.parse((await call(examples[3])).json);+ assert.equal(verified.id, 42); assert.equal(verified.status, 'draft');+ assert.equal(verified.type, route);+ assert.equal(verified.content, existing ? '<p>Updated content.</p>' : '<p>Example content.</p>');+ if (existing) assert.equal(verified.title, 'Keep title');+ for (const [field, ids] of Object.entries(taxonomies)) assert.deepEqual(verified[field], ids);+ assert.equal(writes, 1, 'transport retried an uncertain write');+ assert.equal((await call(examples[4])).success, true);+ const published = JSON.parse((await call(examples[3])).json);+ assert.equal(published.id, verified.id); assert.equal(published.status, 'publish');+ assert.equal(published.content, verified.content); assert.ok(published.link);+ assert.equal(creations, existing ? 0 : 1);+ for (const status of [401, 403, 404, 500]) {+ globalThis.fetch = async () => jsonResponse({ code: status === 404 ? 'rest_no_route' : 'rest_forbidden' }, status);+ const failed = await call(examples[3]);+ assert.equal(failed.success, false); assert.equal(failed.status, status);+ }+ globalThis.fetch = async () => new Response('0', { status: 400 });+ const loggedOut = await call(examples[0]);+ assert.equal(loggedOut.success, false); assert.equal(loggedOut.text, '0');+ }+ }+ } finally { globalThis.fetch = savedFetch; globalThis.chrome = savedChrome; globalThis.browser = savedBrowser; }+});+test('Phonr is opt-in, loads through the normal skill catalog, and adds no privileged HTTP tools', () => {const contents = [];for (const [label, prefix, sources, defaults, normalize, catalog, prompt, tools] of [@@ -111346,6 +111571,7 @@ test('settings exposes custom skills tab and packaged skills resource directory''frankfurter-fx','humanizer','turkish-deasciifier',+ 'wordpress-rest-api','phonr-calls',]);assert.deepEqual(PACKAGED_SKILL_SOURCES_FX.map((skill) => skill.id), [@@ -111359,17 +111585,20 @@ test('settings exposes custom skills tab and packaged skills resource directory''frankfurter-fx','humanizer','turkish-deasciifier',+ 'wordpress-rest-api','phonr-calls',]);assert.deepEqual(DEFAULT_SKILL_SOURCES_CH.map((skill) => skill.id), ['freeskillz-xyz','otp-verification-code-helper','humanizer',+ 'wordpress-rest-api',]);assert.deepEqual(DEFAULT_SKILL_SOURCES_FX.map((skill) => skill.id), ['freeskillz-xyz','otp-verification-code-helper','humanizer',+ 'wordpress-rest-api',]);assert.equal(DEFAULT_SKILL_SOURCES_CH.some((skill) => skill.id === 'turkish-deasciifier'), false, 'chrome: Turkish deasciifier must remain opt-in');assert.equal(DEFAULT_SKILL_SOURCES_FX.some((skill) => skill.id === 'turkish-deasciifier'), false, 'firefox: Turkish deasciifier must remain opt-in');