=== Site Agent ===
Contributors: qentra
Tags: ai, assistant, support, chat, woocommerce
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.8.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a managed, enterprise-ready AI assistant grounded in approved public WordPress content.

== Description ==

Site Agent by Qentra adds an accessible chat bubble and automatically keeps its hosted knowledge index synchronized with public posts and pages.

When WooCommerce is active, the plugin detects store capabilities locally and can enable Sales Agent by Qentra for grounded product and price guidance. Detection sends bounded capability metadata only. Live stock, cart changes and order access remain disabled unless a separately approved, authenticated connector supports them.

Security and privacy defaults:

* AI processing is managed by Qentra; customers do not configure third-party AI credentials in WordPress or the browser.
* Site ownership is verified with a one-time cryptographic challenge.
* Plugin-to-service requests are signed and protected against replay.
* Crawling is restricted to the verified public origin, approved ports and public IP addresses.
* Administrators can exclude paths, disable transcript retention, re-index, or request remote deletion.
* Browser responses render as text; model output is never injected as HTML.

This plugin connects to the Qentra managed service at agent-api.qentra.tech. The service fetches approved public pages, processes extracted content and visitor questions on Qentra-managed AI infrastructure, and stores only the data required for the configured features and retention period. Choosing Add agent also sends the current WordPress administrator email and creates a Qentra account for account continuity. Email ownership is verified with a single-use link before account or subscription access. Review the Qentra Privacy Policy and Terms before enabling it.

== External services ==

Site Agent requires the hosted Qentra service at https://agent-api.qentra.tech to verify the site, crawl approved public pages, manage the knowledge index, create short-lived widget sessions, and answer visitor questions. When an administrator chooses Add agent, it sends the site URL, a generated installation identifier, the plugin version, the current WordPress administrator email, and a one-time ownership challenge. Qentra creates an account identity for that email, but does not grant account or subscription access until the recipient opens a single-use verification link from Manage your account. Later signed requests send administrator-approved settings, public URLs to refresh, version and administrator-email continuity data, and deletion instructions. Widget requests send the installation identifier and visitor question. Qentra-managed AI infrastructure processes approved public-page text and visitor questions to provide indexing and responses.

The service is required for the assistant to function. It is provided by Qentra and is subject to the Qentra Privacy Policy at https://qentra.tech/privacy, Security information at https://qentra.tech/security, and Terms at https://qentra.tech/terms. Qentra's current infrastructure subprocessors and processing safeguards are described in the Qentra Privacy Policy.

== Privacy ==

Administrators control which public paths are indexed and how long conversations are retained. Setting retention to 0 stores no message text or response chain in Qentra's application database. “Disconnect and delete data” disables the widget and requests deletion of hosted files, vector stores, sessions, and site-agent tenant records. The Qentra account, subscription state, and minimal lifetime Free-usage counter remain separately available for account continuity and abuse prevention. The plugin never places Qentra infrastructure credentials in WordPress or the browser.

== Installation ==

1. Upload and activate the plugin.
2. On WooCommerce stores, open WooCommerce > Site Agent. On other WordPress sites, open Qentra > Site Agent.
3. Choose Add agent and follow live discovery/indexing progress until the assistant is ready.
4. Review suggested Skills, choose automatic refresh intervals, and optionally configure a human handoff channel.
5. Use Manage your account to verify the administrator email and manage subscriptions, then adjust appearance, language and privacy controls.

== Frequently Asked Questions ==

= Do I need to configure a third-party AI account? =

No. Qentra manages the AI runtime and its infrastructure credentials in the hosted control plane.

= What content is indexed? =

Only publicly reachable pages on the verified site origin, subject to robots.txt and administrator exclusions. Private, authenticated, cross-origin and non-public-network destinations are rejected.

= How do I delete Qentra data? =

Use “Disconnect and delete data” before uninstalling. That action disables the widget and requests deletion of the hosted index and retained conversations. Uninstalling removes local options only.

= Is my plan linked only by matching an email address? =

No. Add agent creates an account identity from the WordPress administrator email, but matching text alone never grants access to an existing account or paid subscription. The recipient must open a short-lived, single-use verification link. Multiple WordPress sites can then be managed with the same verified Qentra email, while each site connection remains explicitly verified.

== Screenshots ==

1. One-click connection starts with explicit domain verification and public-content indexing.
2. Configure the accessible widget, brand accent, and visitor privacy notice from the dedicated Qentra workspace.
3. Exclude sensitive paths, select zero transcript retention, re-scan content, or disconnect and delete hosted data.
4. The responsive frontend assistant presents a clear privacy notice and answers from approved website knowledge.

== Changelog ==

= 0.8.6 =
* Ensure the account card displays exactly one Manage your account action even when an admin theme overrides the HTML hidden attribute.

= 0.8.5 =
* Keep a successfully registered agent connected when a redundant follow-up heartbeat is temporarily unavailable.

= 0.8.4 =
* Create a persistent Qentra account identity from the consenting WordPress administrator email when Add agent is selected; require email verification before subscription access.
* Show the account email and a single Manage your account action instead of an ambiguous unlinked state.
* Preserve the Free usage allowance when an agent is deleted and added again on the same verified site.
* Restore reliable public-site crawling from the hosted worker and provide clearer safe crawl diagnostics.
* Clarify that deleting hosted agent data does not cancel a separate account subscription.

= 0.8.3 =
* Require a short-lived, single-use widget bootstrap signed by the WordPress server on updated installations.
* Add installation, visitor and rolling cost-abuse limits before chat quota or AI processing.
* Keep subscription entitlements server-side and add durable retry and reconciliation for plan changes.

= 0.8.2 =
* Add the Start plan with 100 chat requests per month.
* Change the Free allowance to 100 chat requests in total without a monthly reset.
* Report whether the current chat quota is lifetime or monthly in connected account views.

= 0.8.1 =
* Remove the internal BUILD marker from distribution archives.
* Add explicit sanitization callbacks to every registered boolean setting.
* Clarify the Qentra managed API data flow and link the applicable Privacy Policy and Terms in External services.

= 0.8.0 =
* Added verified PHP 7.4 compatibility for the Woo Marketplace support floor.
* Moved settings under the WooCommerce menu when WooCommerce is active while preserving the Qentra workspace on other WordPress sites.
* Made aggregate commerce analytics explicitly opt-in and disabled by default.
* Declared compatibility with HPOS and the Cart and Checkout blocks.
* Added clean-install matrix coverage for WordPress 6.9, WooCommerce 11.0 and PHP 7.4/8.1.

= 0.7.0 =
* Added locale-driven commerce responses that honor the configured primary language and automatic visitor-language detection.
* Added localized catalog no-match responses and complete commerce controls for ten initial languages.
* Improved multilingual product intent, category, price and stock recognition.

= 0.6.0 =

* Rebuilt Conversations as a paginated customer inbox with search, status, category, channel, priority, unread, assignee and tag controls.
* Added bounded message pagination so large archives never load thousands of conversations or complete transcripts at once.
* Added a secure WhatsApp live-support bridge that keeps the visitor in the website chat while an operator replies from WhatsApp.
* Added waiting, live and resolved conversation modes with automatic routing and resumable website messages.
* Moved WhatsApp credentials out of WordPress into encrypted Qentra Account configuration with signed webhook validation.

= 0.5.0 =

* Added normalized WooCommerce catalog and variation synchronization with automatic delta updates and scheduled full reconciliation.
* Added separate permissions for catalog data, current prices, stock state, exact quantities, confirmed cart actions and authenticated order status.
* Added grounded product cards with same-site links and visitor-confirmed cart changes in the assistant.
* Added a local order-status view that uses the logged-in WordPress session and never transfers customer or order data to Qentra.
* Added catalog progress, product and variant counts, permission controls, commerce funnel events and HPOS compatibility.

= 0.4.0 =

* Added local WordPress and WooCommerce capability detection for pages, posts, media, products, prices, stock, cart and orders.
* Added an opt-in Qentra Sales Agent for grounded WooCommerce catalog guidance.
* Added a dedicated platform-intelligence view with store version, product count and capability status.
* Sales Agent activation uses one active Skill and is unavailable when WooCommerce is not active.
* Live stock, cart and order operations remain separately protected and cannot be activated through detection alone.

= 0.3.0 =

* Added site-aware Skills recommendations backed by an audited capability catalog and plan-specific active Skill limits.
* Added separate automatic refresh schedules for the knowledge index and Skills recommendations.
* Added a protected WordPress conversation inbox for retained visitor transcripts.
* Added an optional email and WhatsApp handoff that shares only a conversation reference and current page.
* Commerce and scheduling actions remain safely locked until their approved connectors are configured.

= 0.2.4 =

* Updated customer-facing product, privacy and service copy to use Qentra-managed AI terminology consistently.

= 0.2.3 =

* Qentra account connection now opens the secure sign-in flow in a new browser tab while keeping WordPress administration open.

= 0.2.2 =

* Account linking now sends a secure magic sign-in link automatically to the current WordPress administrator email.
* The account email is transferred only in the signed installation request and stored encrypted with the short-lived connection code.

= 0.2.1 =

* Fixed secure Qentra account-link creation for WordPress hosts that send bodyless actions without a JSON payload.

= 0.2.0 =

* Added a top-level Qentra product workspace with Site Agent nested beneath it, ready for future Qentra plugins.
* Added live scan and indexing progress, completion and failure states.
* Added simple essentials plus advanced bubble, chat, color, copy, size and position controls with a live preview.
* Added primary-language selection and automatic visitor-language detection.
* Added optional, subtle “Powered by Qentra” attribution.
* Added secure account linking, plan and usage visibility, manual status refresh and contextual upgrade access.
* Added plugin, WordPress and PHP version telemetry for installation health and support.

= 0.1.0 =

* Initial production candidate with secure registration, managed indexing, chat widget and deletion controls.
