=== Codiecool Site Assistant ===
Contributors: codiecool
Tags: ai, agent, chat, admin, openai
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Your WordPress site’s AI agent — floating chat in wp-admin, powered by Core AI Connectors and Abilities.

== Description ==

**Codiecool Site Assistant** is a site-aware AI agent for wp-admin. Open the floating Pilot button on any admin screen and ask about your site, get guidance, or propose changes that you confirm before they run.

= Highlights =

* Floating chat on every wp-admin screen (fullscreen workspace + history)
* Works with **WordPress AI Connectors** (OpenAI, Anthropic, Google, and other registered providers)
* Smart **Auto** model routing, or pick a specific chat model in the composer
* Site-aware tools for overview, plugins, themes, posts/pages, users, comments, and more
* Read Media Library files in chat (PDF, DOCX/DOC, XLSX/XLS, PPTX/PPT, ODT, RTF, HTML, TXT/CSV/JSON/Markdown) plus images via vision
* Optional write actions with **Confirm** in chat (drafts, installs, settings proposals, and more)
* Approvals queue for restricted roles; audit log and undo window for supported changes
* Voice input (HTTPS required), Media Library attachments, dark mode, and keyboard shortcuts
* **Developer tools (Coming soon):** MCP Server, MCP Client, and plugin bridges — shown in Settings → Developer as Coming soon in this release

= Requirements =

* **WordPress 7.0+** (AI Client, Abilities API, and Connectors)
* At least one AI provider plugin connected with a valid API key
* PHP 8.0+

= Privacy =

When you chat, this plugin may send relevant site context and your message to the AI provider you connected (for example OpenAI, Anthropic, or Google). Review your provider’s privacy policy. This plugin does not send data to a Codiecool cloud service.

== External services ==

This plugin relies on third-party AI providers that you connect under **Settings → Connectors** (WordPress AI Client). Chat, tool use, and optional image generation run through the provider you choose. The plugin does not hard-code a single vendor API URL; it uses the WordPress AI Client / Connectors APIs.

Typical providers you may connect (depending on which connector plugins you install):

* **OpenAI** — chat completions and (when the connected models support it) image generation via the WordPress AI Client. Data sent: your prompts, relevant site context the agent selects, and for images the image prompt. Sent when you chat or confirm an image-generation action.
  Terms: https://openai.com/policies/terms-of-use
  Privacy: https://openai.com/policies/privacy-policy

* **Anthropic** — chat via the WordPress AI Client when that connector is active. Data sent: prompts and selected site context when you chat.
  Terms: https://www.anthropic.com/legal/consumer-terms
  Privacy: https://www.anthropic.com/legal/privacy

* **Google (AI / Gemini connectors)** — chat (and image models if offered by the connector) via the WordPress AI Client. Data sent: prompts and selected site context when you chat.
  Terms: https://policies.google.com/terms
  Privacy: https://policies.google.com/privacy

You choose which providers to install and which API keys to store. Keys are managed by WordPress Connectors / the AI Client, not by a Codiecool server.

**Public URL fetch (fetch-url ability):** When you ask the agent to read a public documentation URL, WordPress may request that URL over HTTPS/HTTP and return extracted text. No API key is sent to those sites.

== Installation ==

1. Upload the `codiecool-site-assistant` folder to `/wp-content/plugins/`, or install the ZIP via **Plugins → Add New → Upload Plugin**.
2. Activate **Codiecool Site Assistant**.
3. Open Site Assistant → **Settings → Connectors** (or **Settings → Connectors** in WordPress) and connect a provider with your API key.
4. Click the Pilot button on any admin screen to start chatting.

== Frequently Asked Questions ==

= Do I need WordPress 7.0? =

Yes. Site Assistant depends on the Core AI Client, Abilities, and Connectors APIs introduced in WordPress 7.0.

= Where do I put my API key? =

In **Connectors** (provider plugin + API key). You can manage keys from Site Assistant → Settings → Connectors or the full WordPress Connectors screen.

= Can Site Assistant change my site by itself? =

Destructive or write actions are proposed in chat and require your **Confirm** (and may require admin approval for restricted users). Keep Write actions enabled only if you want that workflow.

= What about MCP / Developer tools? =

Settings → Developer shows **Coming soon** in this release. MCP Server, MCP Client, and plugin bridges will ship in a future update.

= Why is voice input not working? =

The browser Speech Recognition API requires **HTTPS** (or localhost). On Local WP, enable SSL and open wp-admin over `https://`.

= Does Site Assistant work without WooCommerce? =

Yes. WooCommerce-related tools appear only when WooCommerce is active.

== Screenshots ==

1. Floating Pilot button and fullscreen chat workspace in wp-admin.
2. Composer with Auto model picker, attachments, and send/stop control.
3. Connectors settings — connect a provider and choose a preferred model.
4. Approval / confirm flow for proposed site changes.

== Changelog ==

= 1.1.2 =
* Escaped inline bot SVG output with wp_kses (late escaping)
* Unique plugin prefixes: `codisias` / `Codiecool\SiteAssistant` for options, REST, abilities, and the JS localize global

= 1.1.1 =
* Renamed to **Codiecool Site Assistant** (slug `codiecool-site-assistant`) — removed discouraged “WP” naming per Plugin Directory guidelines
* Updated display name, plugin headers, text domain, and user-facing strings

= 1.1.0 =
* All built-in abilities available (no feature-pack unlock gate)
* Uses WordPress AI Client for chat and image generation (no direct provider HTTP for images)
* Documents external AI services (Terms/Privacy) in the readme
* Developer → MCP / Bridges remain **Coming soon** in this build
* Read Media Library files: PDF, DOCX/DOC, XLSX/XLS, PPTX/PPT, ODT, RTF, HTML, TXT/CSV/JSON/Markdown

= 1.0.0 =
* Initial WordPress.org release
* Floating Pilot chat on every wp-admin screen (fullscreen workspace + history)
* WordPress AI Connectors support with Auto model routing
* Site-aware abilities, confirm-before-write proposals, approvals, and audit
* Voice input, Media Library attachments, dark mode, and keyboard shortcuts

== Upgrade Notice ==

= 1.1.2 =
Security and naming fixes for Plugin Directory review: unique codisias prefixes and escaped SVG output.

= 1.1.1 =
Renamed to Codiecool Site Assistant (slug codiecool-site-assistant). Deactivate the previous plugin folder before installing this ZIP.

= 1.1.0 =
Connectors + chat continue to work; Developer MCP tools remain Coming soon.

= 1.0.0 =
Initial release. Requires WordPress 7.0+. Connect an AI provider under Connectors before chatting.
