=== Elves Builder ===
Contributors: yourwporgusername
Tags: elementor, gutenberg, ai, page builder, mcp
Requires at least: 6.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.7.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Watch your AI assistant build pages live in Elementor, the block editor or WPBakery: a visible cursor picks widgets or blocks, drops them in place and styles them.

== Description ==

Elves Builder connects Claude Code, OpenAI Codex, VS Code or Cursor to your page editor: Elementor, the WordPress block editor (Gutenberg) or WPBakery Page Builder. Ask your assistant for a section and watch it work like a person would: the cursor grabs a widget or block, carries it onto the page, drops it, and opens its settings.

* Builds with real Elementor elements or real blocks, so everything stays editable by hand. Which builders your plan includes is shown under Builders (Free: Elementor; Pro: the one you choose; Deluxe and Agency: all). WPBakery works in its backend editor (its frontend editor is not supported yet).
* Every step can be undone with Ctrl+Z. Nothing goes live until you publish.
* Publishing a page or changing site-wide colors and fonts always asks for your approval first. You can also ask for approval before an element is deleted or many elements are moved at once.
* An activity log of what your assistant did, stored in your own site's database (it is never sent to the service) and exportable as a CSV for clients.
* Choose which user roles may use the assistant (administrators only by default), and how fast the cursor works (Instant, Normal or Presentation for demos and client recordings).
* Saved prompts and design presets, a plan and sites overview, and licence key activation for paid plans.
* The assistant can only run a fixed set of page-building commands inside your page editor. It cannot run PHP or any other code on your server. Adding custom code to a page (an HTML, shortcode, code or classic block or widget, custom CSS or custom attributes) always asks you first and shows you the code, and script in any other widget or block is refused.

= How it works =

1. Install and activate the plugin, then click Connect this site (or open Elves Builder in the admin menu).
2. Add your AI assistant: one click for VS Code and Cursor, one command for Claude Code, a short config snippet for OpenAI Codex.
3. Open any page with Edit with Elementor (or the block editor) and ask your assistant to build something.

== External services ==

This plugin relies on the Elves Builder service (the "relay") to connect your AI assistant to your page editor (Elementor, the block editor or WPBakery's backend editor). Without it, the plugin cannot do anything. Every request from your site includes the plugin version (in an X-Elves-Plugin header) so the service can support older versions; requests that act for your site also include its private site token.

* Connecting: when you click Connect this site, your site sends its address to the service, which replies with a one-time code. The service then briefly calls back an Elves Builder endpoint on your site (/wp-json/elves-builder/v1/verify) to confirm the site serves that code, which proves the site is yours. Nothing happens until you click.
* Editing: while a page is open in the Elementor, block or WPBakery editor, the editor connects to the service with your site token and says which builder it is, so the service can check your plan includes it. Page-building commands from your AI assistant pass through the service to the editor, and the editor's answers (such as the page's element or block structure and settings) pass back to your assistant.
* Connection status: whenever you open an Elves Builder screen in the admin, your site asks the service for its status (plan, usage this month, whether an editor is open, which assistant was last used, which sites and builders your plan includes).
* Plan catalog: the Plan and Builders screens fetch the public list of plans and prices. No site data is sent with this request.
* Licence and sites: when you enter a licence key, the key is sent to the service to attach this site to your account; Detach removes it. The Sites screen asks for the sites on your account, and Free a slot sends the site you choose. Choosing a builder sends that choice.
* Disconnecting: Disconnect, and deleting the plugin, tell the service to forget this site's token.
* Not sent: visitor data, passwords, your activity log, or any content outside the page you are editing. The activity log stays in your own database.
* Service: https://mcp.elvesbuilder.com, hosted on Cloudflare Workers.
* Terms of service: https://elvesbuilder.com/terms
* Privacy policy: https://elvesbuilder.com/privacy

== Trademarks and the hosted service ==

The plugin's code is licensed under the GPL. The names "Elves Builder" and "ElvesBuilder", the elf cursor and logo artwork, and the hosted service at elvesbuilder.com belong to ElvesBuilder and are not covered by that license. Forks must use a different name and artwork. See NOTICE.txt in the plugin folder.

== Installation ==

1. Upload the plugin through Plugins → Add New → Upload Plugin, or install it from the WordPress plugin directory.
2. Activate it. To build with Elementor, Elementor must be active too; the block editor is part of WordPress.
3. Click Connect this site in the notice, or open Elves Builder in the admin menu.

== Frequently Asked Questions ==

= Which AI assistants work? =

Any assistant that supports MCP over HTTP, including Claude Code, OpenAI Codex, VS Code (GitHub Copilot) and Cursor.

Elves Builder is an independent product, unaffiliated with and not endorsed by Anthropic, OpenAI, Microsoft, Cursor, Elementor or WordPress.

= Do I pay for AI usage through this plugin? =

No. You use your own AI assistant and subscription. Elves Builder only provides the connection and the live building experience.

= Can the AI break my site? =

It can only run a fixed set of page-building commands inside your page editor, and every change can be undone. It cannot run PHP on your server. It cannot publish pages, change site-wide styles or add custom code (HTML, shortcode or code widgets and blocks, custom CSS, custom attributes) without you clicking to approve, and you can switch on approval for deleting and for moving many elements too. Content that can run script is refused in every other widget. Only administrators receive the connection token by default; you can allow other roles in Settings, but a role you allow can act for the whole account, so allow only people you trust.

= Is there a free plan? =

Yes. The free plan includes a monthly allowance of new elements on one site. Paid plans are planned, but online checkout is not available yet.

= Where is the activity log stored? =

In your own site's database, in a table the plugin creates. It is never sent to the service. Old entries are removed automatically (90 days by default; you can change it), and you can erase it any time. Deleting the plugin removes it too, unless you choose to keep your data.

= What happens to my data if I delete the plugin? =

The plugin tells the service to forget your site's token, then removes its settings, saved prompts and the activity log. If you switch on "keep my data" in Settings, the settings, prompts and log are kept.

== Screenshots ==

1. The cursor placing a heading widget while your assistant builds a hero section.
2. The Elves Builder dashboard: connection status, plan and recent activity.

== Changelog ==
= 0.7.0 =
* Elementor is no longer required: the plugin works with whichever supported builder you use.
* Ready for Elves Studio (sold separately): the editor connection can drive Studio pages and asks your approval before any site-wide change (menus, site styles, site settings, redirects).

= 0.6.0 =
* WPBakery Page Builder support (backend editor): your assistant can add, edit, move, duplicate and delete rows, columns and elements. Raw HTML, JavaScript and custom CSS elements always ask you first. WPBakery is a separate, licensed product that you install yourself. Its frontend editor is not supported.
* The supported builders are Elementor, Gutenberg (the block editor) and WPBakery.
* Free includes Elementor, Pro includes one builder of your choice, Deluxe and Agency include all three.

= 0.5.0 =
* Gutenberg support: your assistant can now build in the WordPress block editor as well as Elementor. Pro includes one builder of your choice; Deluxe and Agency include all supported builders.
* OpenAI Codex added to the Connect page.
* Stronger custom-code guard: raw HTML blocks, shortcodes, block bindings and per-block CSS always ask for approval.


= 0.4.1 =
* Plan and billing: when checkout is open, "Choose" on a paid plan opens the checkout page on elvesbuilder.com in a new tab. Payment happens there, never inside the plugin; after paying you receive a licence key to paste into Plan and billing. While checkout is closed the screen says so, as before.

= 0.4.0 =
* New admin dashboard with its own menu: Overview, Connect, Builders, Activity, Replays, Prompts, Safety, Plan and billing, Sites, Settings and Help.
* Activity log of what your assistant did, stored on your own site, with filters and a CSV export. Entries are trimmed automatically.
* Safety and Settings: choose which user roles may use the assistant, the default build speed, and optional approval before deleting or moving many elements. Roles without access never receive the site token in the editor, and only administrators have access by default.
* Custom code is never added silently: HTML and shortcode widgets, custom CSS and custom attributes ask for your approval and show you the code first. Script-capable content (script tags, on* event attributes, javascript: links, iframes) is refused in other widgets, and site-wide colors and fonts are checked before they are previewed.
* Safer relay address: a custom relay address must use wss://, or ws:// only for a server on your own machine. The connection token is no longer loaded on every page view.
* Plan and Sites screens: see your plan, activate or detach a licence key, free a slot when you move a site, and choose your builder.
* Disconnect button. Deleting the plugin now also disconnects the site from the service and removes its data (unless you keep it).
* Saved prompts and design presets.
* The plugin sends its version to the service with each request.
* The old Settings → Elves Builder link now redirects to the new dashboard.

= 0.3.1 =
* Safer one-click connect: the service now issues a one-time code and a secret, so the code alone cannot be used to connect your site.
* Duplicating an element now counts toward the free plan's monthly allowance, as adding one does.

= 0.3.0 =
* New name: Elves Builder. Existing connections carry over automatically.
* Redesigned dashboard with its own menu, live connection status, usage meter and copyable example prompts.
* The live cursor is now the Elves Builder elf.

= 0.2.0 =
* One-click Connect this site: the token is issued and saved automatically.
* One-click Add to VS Code and Add to Cursor buttons.

= 0.1.0 =
* First release: live building with a visible cursor, connection status, and setup steps.
