== Changelog ==

Full version history for Cowboy MCP. The readme.txt lists the most recent
release; older entries are kept here.

= 1.6.6 =
* Fix: connecting over OAuth while logged out of wp-admin works again. The login round-trip was stripping the percent-encoding from the authorization request, which corrupted redirect_uri and resource so the connection could not resume after signing in. Thanks to @lukaszliniewicz for the report and the fix.
* Fix: the per-IP request limit that guards the endpoint against credential stuffing now counts only failed authentication attempts. Busy sessions behind one IP (cloud connectors, parallel tool calls) were being refused with 429 before their own per-key limit applied.
* Fix: scheduled publishing works. wp_create_post and wp_update_post accept a date ("YYYY-MM-DD HH:MM:SS" in the site timezone, or ISO 8601 with an offset), and wp_update_post accepts status "future".
* Fix: wp_db_health_report counted autoloaded options using only the pre-6.6 "yes" value and undercounted on current WordPress.
* Fix: the Activity tab and audit log now record whether each tool call succeeded, failed, or threw.
* Change: the cache tools are always available. Without WP Rocket, LiteSpeed Cache, or W3 Total Cache, wp_cache_flush clears the WordPress object cache and expired transients instead of the tool being absent.

= 1.6.5 =
* Security: writes into mu-plugins/ now require Power mode. Must-use plugins load on every request and cannot be paused by recovery mode, so one broken file there takes down the site and the undo journal with it. Agents are pointed to a regular plugin plus wp_activate_plugin instead.
* Fix: PHP files are syntax-checked before they are written; a truncated or malformed file is rejected with the line number and nothing lands on disk. Dry runs report the same refusals.
* Fix: a short write (disk full, quota) fails cleanly instead of renaming a truncated file into place.

= 1.6.4 =
* New: WordPress Abilities API bridge (WordPress 6.9+). Cowboy's tools become cowboy-mcp/* abilities for WP-CLI, the REST API, the MCP Adapter and WordPress AI tooling - with safe mode, dry run, audit log and undo still applied - and abilities from other plugins appear as Cowboy tools. Two switches under Settings, on by default.
* New: Connection Doctor reports the bridge state.
* New: a welcome notice after activation and a one-time feedback prompt (review or support).
* Fix: custom key scopes accept Abilities API names; wp_update_option and wp_list_changes declare their value types.

= 1.6.3 =
* New: local development, first-class - Cowboy MCP now works just as well on a local site (Local, Studio, MAMP, DevKinsta, and any localhost setup) as on a live one. No public URL or tunnel needed: Claude Code, Cursor, Codex, and Gemini CLI connect with an API key exactly as they do in production, and Claude Desktop connects through a small local bridge.
* New: the Connection tab recognises local sites and shows, per client, what works locally and what needs a public URL - with a ready-to-copy Claude Desktop config that bridges through mcp-remote (read-only key by default).
* New: Connection Doctor understands local sites - plain HTTP on a local site passes with local context, and the public-hostname check becomes a warning with fix steps for both local and public setups instead of a failure.
* New: self-signed certificate help - on loopback hosts the connection snippets offer a plain-http variant, with a clear warning against disabling TLS verification.
* Compatibility: tested with WordPress 7.1.

= 1.6.2 =
* New: Gutenberg block editing - read any post as a block tree and apply surgical batch edits (update, insert, delete, move, replace) without resending full content.
* New: block pattern tools - list registered and user patterns, create, update, and delete user patterns (synced or unsynced).
* New: site editor tools - list, read, save, and reset block theme templates and template parts; editing a theme template creates an override you can undo back to the theme's version.
* New: global styles tools - read and update theme.json user customizations (colors, typography, spacing); navigation listing for block themes.
* New: all Gutenberg writes are undoable from the Activity tab, with the same raw-HTML safety gate as the Elementor tools.
* New: per-credential tool scoping - limit any API key or OAuth connection to read-only access or a custom list of tools; existing credentials keep full access until you change them.
* Security: a credential can never widen its own scope - scope settings are write-protected from the API, even in Power mode.
* Security: hardened the WP-CLI safety blocklist against shell-quoting and flag-injection bypasses - commands are now tokenized the way the shell parses them before matching.
* Security: SQL run through WP-CLI is now scanned with MySQL versioned comments unwrapped, and commands that cannot be safely parsed are rejected.

= 1.6.1 =
* New: user management - list, read, create, update, and delete users, including role changes.
* New: navigation menus - create, rename, assign theme locations, and set menu items as a nested tree.
* New: media library - list attachments with a filter for images missing alt text, edit titles, captions, and alt text, and delete attachments.
* New: deleted media is recoverable - an attachment's files are moved aside instead of destroyed, so the deletion can be undone from the Activity tab, and featured-image and site-logo links are restored with it.
* New: SEO meta management for Yoast SEO and Rank Math - read and update a post's SEO title, meta description, focus keyword, noindex/nofollow, canonical URL, and Facebook/X social overrides through one unified toolset, with template variables like %%category%% preserved.
* New: SEO audit - scan posts and pages for missing or badly sized meta descriptions, missing focus keywords, over-long titles, and published posts still set to noindex.
* New: SEO meta changes are undoable like everything else, and Yoast's indexable cache refreshes automatically so edits show up on the site immediately.
* Security: granting an administrator-level role, setting a password, or changing a privileged user's email now requires Power mode.
* Security: you can never change your own role, password, or email through the API, and the last administrator can be neither deleted nor demoted.

= 1.6.0 =
* New: install plugins and themes straight from WordPress.org (wp_install_plugin / wp_install_theme) - pure PHP, no WP-CLI or shell access needed
* New: update plugins and themes (wp_update_plugin / wp_update_theme), one at a time or all at once - with automatic file backup, database checkpoint, and a post-update health check that restores the old version automatically if the site breaks
* New: delete plugins and themes (wp_delete_plugin / wp_delete_theme) with a backup kept for undo
* New: wp_list_plugins and wp_list_themes now report available updates (update_available / new_version, optional refresh_updates)
* New: every install, update, and delete is journaled - wp_undo_change rolls a plugin or theme back to the exact previous version
* New: "Auto-checkpoint before plugin & theme updates" setting (on by default)
* Fixed: PHP 8.0/8.1 compatibility - corrected return-type syntax (true|WP_Error) that caused a fatal error on PHP older than 8.2

= 1.5.3 =
* New: Connection Doctor - a one-click self-test on the Connection tab that checks HTTPS, public reachability, REST availability, and OAuth discovery, names the likely blocker (Cloudflare, ModSecurity, Basic Auth, cache plugins), and gives you a copy-pasteable report. Also available as the wp_connection_doctor MCP tool and the `wp cowboy-mcp doctor` WP-CLI command.

= 1.5.2 =
* New: bundled translations for the admin settings page and the OAuth consent screen in ten more locales - Simplified Chinese (zh_CN), Japanese (ja), Korean (ko_KR), German (de_DE), Spanish (es_ES), French (fr_FR), Italian (it_IT), Portuguese - Brazil (pt_BR), Hindi (hi_IN), and Indonesian (id_ID).

= 1.5.1 =
* New: Russian (ru_RU) and Ukrainian (uk) translations for the admin settings page and the OAuth consent screen.
* The plugin now registers a Domain Path and loads its text domain on init, so bundled translations apply on WordPress 6.2+.

= 1.5.0 =
* New: Activity tab - a per-change undo journal. Every change an AI agent makes (posts, options, terms, comments, files, users, media, plugins/themes, WooCommerce, ACF, Wordfence) is recorded, and you can roll any of them back individually from wp-admin. Conflict detection warns you if something else changed in the meantime.
* New: database checkpoints - take a one-click snapshot of your database and restore the whole site to it later. A checkpoint is also taken automatically before mutating WP-CLI commands.
* New: batch undo - reverse every change made by a single batched request together.
* New: six rollback tools for agents (list changes, undo a change, and create/list/restore/delete checkpoints), plus settings to tune undo-history retention and how many checkpoints to keep.
* Your MCP API keys and the plugin's own settings are never touched by undo or checkpoint restore.

= 1.4.1 =
* New: redesigned connection page - pick your app (claude.ai, Claude Desktop, ChatGPT, Claude Code, Codex, Opencode, Cursor, Gemini CLI) from a sidebar and follow steps tailored to it.
* New: connect from ChatGPT - custom connectors (Developer mode) work with the built-in one-click sign-in.
* Fixed: OAuth setup steps now appear immediately after enabling the Desktop Connector.
* Fixed: the connection-page preference is now cleaned up on uninstall.

= 1.4.0 =
* New: one-click sign-in for the Claude desktop and web apps - no terminal required.
* Updated for WordPress.org plugin directory compliance.
* Changed: database tools now use fixed, safe queries - no free-form SQL.
* Removed: the self-hosted auto-updater; updates now come through WordPress.org.

= 1.3.0 =
* Feature: self-hosted one-click updates. The plugin checks cowboymcp.com for new versions and offers updates through the normal WordPress Plugins screen, including the per-plugin auto-update toggle (owner opt-in). Updates are delivered from GitHub release assets over HTTPS. Fails closed - any check error simply shows no update.

= 1.2.0 =
* Feature: optional **Power mode** (admin opt-in, off by default) - lifts curated safety restrictions for trusted power users: `wp_cli` `eval`/`shell` and other blocked commands, dangerous SQL (DDL), writing files outside `wp-content/`, and SSRF protection on outbound requests. The plugin's own API keys and settings, credential redaction, and self-delete protection remain enforced; `safe_mode` confirmation gating is unaffected.

= 1.1.0 =
* Security: lock down `wp_db_query` - apply the write blocklist (incl. INTO OUTFILE/DUMPFILE) to the read path, reject comment-obfuscated and credential-targeting queries, and redact secret columns
* Security: block reads of sensitive options via resource templates, completions, and WooCommerce settings; block writes to payment-gateway/secret/role option groups
* Security: harden SSRF protection - resolve all A/AAAA records, normalize IPv4-mapped IPv6, deny loopback/link-local/ULA, and use the safe HTTP transport so redirects are re-validated
* Security: API-key validation no longer uses the secret-derived prefix as a fast path (timing side-channel); add a per-IP request throttle applied to all requests
* Security: block `--require`/loader global flags and whitespace-obfuscated commands in `wp_cli`; normalize the SQL write blocklist against inline comments
* Security: refuse executable file writes into the uploads directory; harden wp-content path confinement (null bytes, symlinked parents, sibling-prefix)
* Security: prevent deleting the last administrator and validate `reassign_to` in `wp_delete_user`
* Security: expand audit-log redaction, scrub secrets from error-log/transient output, relativize hook file paths, and add Origin validation
* Hardening: apply the tool allowlist before dry-run/safe-mode, and guard against nested batch execution

= 1.0.2 =
* Prefix all admin identifiers with `cowboy_mcp_` to avoid namespace collisions
* Change REST namespace from `mcp/v1` to `cowboy-mcp/v1`
* Sanitize `$_SERVER['REMOTE_ADDR']` with `sanitize_text_field()`
* Add capability checks to plugin activation/deactivation and theme switching

= 1.0.1 =
* Rename plugin integration files to avoid false-positive library detection
* Update author metadata

= 1.0.0 =
* Initial release
