=== Apeari – AI Content Editor ===
Contributors: apeari
Tags: ai, gutenberg, content editor, writing assistant, block editor
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.2.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Describe a change. Preview it. Make it yours. Edit Gutenberg content with AI, rewrite copy and create draft pages without leaving WordPress.

== Description ==

Apeari is an AI content editor for Gutenberg. Select a block, describe a change and review a private preview. Your live page changes only when you publish.

= From an idea to an edit =

* **Rewrite in context.** Improve tone, clarity or length while looking at the page.
* **Build with native blocks.** Add supported sections, text, buttons, images and galleries.
* **Use your own media.** Choose existing WordPress images.
* **Keep the final say.** Preview, undo, redo and publish with conflict checks.
* **Start a new draft.** Generate draft pages or posts with a separate fast model.
* **Keep your workflow.** Edit in Gutenberg and optionally fill supported Yoast SEO, Rank Math or SEOPress fields.
* **Find your way quickly.** A five-step editor guide appears once per user and site. Reopen it with the small question-mark button at the top right.
* **Edit directly.** Update block text, heading level, alignment and button links in the inspector; duplicate, move or remove selected blocks in the private draft.

= Try requests like these =

* "Rewrite this introduction to sound warmer and more personal."
* "Add a heading and a short paragraph below this section."

These open-ended requests require an AI connection. Local demo mode accepts a small set of example commands.

= Choose your AI connection =

The plugin is free; AI processing costs extra. Use your own OpenAI or Anthropic API key with a compatible JSON Schema model, billed by the provider, or an Apeari account with paid service credits. Hosted requests use the verified domain's token balance; answers without changes may also consume credits. Local editing and preview need no paid credits or subscription.

Hosted AI needs a verified HTTPS website and a **Lite installation token**. See the installation steps below. AI requests require explicit consent in Settings > Apeari.

= Scope and requirements =

This is the Gutenberg-only edition, also called Apeari Lite. It supports an allowlist of native blocks and preserves existing unsupported blocks. It does not edit theme files, templates or plugin code, generate executable code, add custom HTML or shortcodes, upload images or download remote media. Existing-page editing does not change publication status. Access is limited to administrators. Apeari PRO is a separate download and cannot be active alongside this edition.

Learn more: https://apeari.com

== Source code and development ==

Complete editable source is bundled in src/, views/, assets/js/ and assets/css/. editor.js and bridge.js are maintained source, loaded directly without compilation or minification. No asset build is required. See source.txt for development, ZIP packaging and third-party asset attribution.

Direct provider APIs support the declared WordPress 6.5 minimum; the core AI Client requires WordPress 7.0. Credentials and consent are configured in Settings > Apeari.

== External services and privacy ==

Fonts and editor assets are bundled locally. No analytics, licensing requests or background installation reports. AI is disabled until an administrator configures a provider and explicitly consents. Submitting an AI request then contacts the selected service:

* Apeari hosted AI: https://apeari.com/v1/lite/edits
  OpenAI-powered, restricted Gutenberg edit proposals and draft content. Requires an account, a verified HTTPS domain, Lite installation token and paid service credits. A useful answer without changes can consume credits.
  Terms and data processing agreement: https://apeari.com/regulamin
  Privacy: https://apeari.com/polityka-prywatnosci
* OpenAI: https://api.openai.com/v1/responses
  Terms: https://openai.com/policies/services-agreement/
  Privacy: https://openai.com/policies/privacy-policy/
* Anthropic: https://api.anthropic.com/v1/messages
  Terms: https://www.anthropic.com/legal/commercial-terms
  Privacy: https://www.anthropic.com/legal/privacy

Requests contain your instruction, up to six recent messages and necessary selected-page block context, including text, attributes and supported styles. Image titles/alt text and URLs inserted into a message may be included; image files are not sent. Draft generation sends the brief, language, sequence number and previous generated titles. Editing requests can also synchronize a structured theme index: relative file names, hashes, CSS selectors and property names, template rendering markers, design settings and supported block capabilities. Full theme files, executable source bodies, other pages' content and provider keys are not sent to hosted Apeari AI. Apeari stores this index separately for each domain and edition so later sessions can reuse it; changes to theme content or effective settings create a new revision. Local knowledge is stored in a non-autoloaded WordPress option and removed on uninstall. Own-key mode sends selected knowledge directly to the selected provider. The site owner must have authority to share the data and determine applicable processing terms. Do not submit unauthorized confidential or personal information.

Hosted Apeari results are retained for up to 30 days for retries; billing records follow the service privacy policy. Both the API and WordPress validate hosted operations against an allowlist. Disabling service consent stops new calls. Contact the service for account/data erasure. Direct providers' retention follows their terms.

Domain verification is administrator-initiated: Apeari calls the fixed HTTPS WordPress /apeari/v1/ownership endpoint using a single-use secret valid for 15 minutes. The endpoint provides no editing access. Multisite proof generation requires a superadministrator. Installation tokens and provider keys are encrypted in the database using WordPress salts and remain server-side. A local PRO migration may copy settings into separate Lite options, but does not enable AI consent or migrate drafts.

Each local conversation message expires seven days after saving; refresh, new messages and undo/redo do not renew old messages. Generation metadata expires seven days after the last generation step/status change, not the last view. Private editing sessions expire after two hours of inactivity. Expired messages are excluded from AI context, restored sessions and exports. Physical removal uses scheduled WordPress cleanup, which needs site visits or system cron. sessionStorage holds a per-tab session identifier. A per-user preference remembers dismissal of the optional PRO introduction. Restoring conversation history is optional.

Settings > Apeari can erase your local editor data on the current site. WordPress personal data export/erasure includes Apeari data across multisite sites with pagination. User removal clears that site's private editor data; network deletion clears it across sites. Generated drafts are ordinary posts subject to your site's retention policy. Uninstall removes Apeari settings, secrets, history and cleanup tasks; it keeps pages, posts, media and PRO data. The bundled privacy.txt contains further implementation details.

== Installation ==

1. Install Apeari from Plugins > Add New, or upload the ZIP using Upload Plugin. Deactivate Apeari PRO first if it is active.
2. Activate Apeari and follow the setup wizard. You can choose local demo mode without an account or connect AI. Reopen setup from Settings > Apeari at any time.
3. For Apeari hosted AI, generate the WordPress ownership proof, verify it in your Apeari dashboard, then copy a newly generated Lite installation token back to WordPress. Your verified website needs service credits. Alternatively, enter your own OpenAI or Anthropic API key and a compatible model.
4. Read the data-sharing information and explicitly enable the appropriate AI consent. Demo mode requires no AI consent.
5. Open Appearance > Apeari and select a page. Select a supported block and describe a change, or open the draft content generator.
6. Review the private preview. Publish only when you are happy with the result.

== Frequently Asked Questions ==

= Is Apeari free? =
The plugin and local editor features are free. Real AI processing is paid separately: use your own provider key or Apeari service credits. 

= Do I need an Apeari account? =
Only for hosted Apeari AI. Your own OpenAI or Anthropic key and local demo mode do not require an Apeari account.

= Will AI change my live page automatically? =
No. Changes stay in a private preview until you publish. New generated pages/posts start as drafts and are published individually.

= Does it work with Elementor or another page builder? =
Apeari edits supported native Gutenberg blocks. It does not edit proprietary page-builder layouts or unsupported blocks.

= Does it change the theme? =
No. This edition changes the selected page's Gutenberg content and creates new draft pages/posts. It cannot edit theme files, templates, global styles or plugin code.

= Can it use images from the internet? =
No. Add images to WordPress Media yourself, then select existing media in Apeari.

= Does it overwrite another editor's changes? =
Publication checks the original content hash and WordPress editing locks. If content changed elsewhere, publication is rejected so you can reload the current version.

== Screenshots ==

1. The Apeari Lite workspace with a real Gutenberg page, conversation panel and private preview. Captured in local demo mode; interface labels are Polish.
2. The native Gutenberg editor inside Apeari. Content remains editable as WordPress blocks.
3. First-run setup explains the Gutenberg-only scope and the review-before-publishing workflow.

== Changelog ==

= 1.2.9 =
* Clear image attachments from the composer when the message is sent.

= 1.2.8 =
* Replace explicit text in the selected Gutenberg block locally, including on long pages.

= 1.2.7 =
* Added a reusable, content-versioned JSON theme index and a shared catalog of 36 Gutenberg workflows and 22 editing rules.
* Hosted editing can reuse a domain-scoped theme reference; only relevant knowledge snippets are sent to the model.
* Preserved current target validation, edition limits, preview and explicit publication.

= 1.2.6 =
* Dark green editor workspace, a one-time five-step guide and a small help button.
* Direct block editing, structure actions and desktop/tablet/phone previews.
* Explicit apply/cancel in the block editor and protection of unapplied inspector edits.

= 1.2.5 =
* Fixed activation with Apeari PRO, including network activation on multisite.
* Documented the bundled editable source and reformatted editor and preview templates for review.
* Removed unnecessary manual translation loading for WordPress.org.

Older releases are documented in changelog.txt.

== Updates ==

Packages downloaded from apeari.com check https://apeari.com/downloads/apeari.json for new releases. No credentials, conversation, content or domain are included in this request; the server sees the connection IP. ZIP files are verified against the release SHA-256 before WordPress installs them. Automatic updates follow the WordPress administrator setting. The separate WordPress.org build has no external updater.
