=== WeblyConnect ===
Contributors: weblyarts
Tags: chatbot, knowledge-base, saas, tenant
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.2.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect a WordPress site to WeblySuite cloud services: tenant auth, AgentHub chat streaming, RAG dossiers, and MCP.

== Description ==

WeblyConnect is the **client** for [WeblySuite](https://weblyarts.com/weblysuite), a hosted SaaS by WeblyArts.

It does not run a local large language model. After you connect a WeblyToken from your WeblySuite account, the plugin talks to:

* AgentHub (`agenthub.weblyarts.com`) for visitor and operator chat (SSE / ReAct)
* WeblyRAG (`weblyrag.weblyarts.com`) for knowledge dossiers
* WeblyMCP (`mcp.weblyarts.com`) for cloud tools
* WeblySuite console (`suite.weblyarts.com`) for token connect, plan snapshot, and billing

Companion plugins (WeblyAgent Connect, WeblyMCP Connect) add the visitor chat widget and the WordPress MCP server. They require this plugin.

= WeblySuite account (required) =

This plugin is useless without a WeblySuite tenant account. Connecting the token is explicit consent to send chat, site, and dossier data to WeblyArts services.

* Console: https://suite.weblyarts.com
* Product page: https://suite.weblyarts.com/weblyconnect/
* Terms (EN): https://suite.weblyarts.com/terms-of-service-en/
* Terms (IT): https://suite.weblyarts.com/terms-of-service/
* Privacy: https://weblyarts.com/en/privacy

Plan quotas (chat volume, RAG storage, MCP slots) are enforced by the **cloud services**, not by locking PHP that ships in this zip. If a request is over quota, AgentHub or WeblyRAG returns an error.

= What this plugin includes =

* Encrypted storage of the tenant WeblyToken
* OAuth-like connect flow back to the WeblySuite console
* Shared streaming / ReAct UI assets for companion plugins
* Admin screen: connection status, plan snapshot, disconnect

= Bundled libraries =

* `@microsoft/fetch-event-source` v2.0.1 (MIT), readable source in `assets/js/vendor/fetch-event-source.js`

== Installation ==

1. Upload the `weblyconnect` folder to `/wp-content/plugins/` or install the zip from Plugins > Add New.
2. Activate WeblyConnect.
3. Open **WeblyConnect** in the wp-admin menu.
4. Click **Connect to WeblySuite** and sign in with your WeblySuite tenant account.
5. Optional: install WeblyAgentPress for the visitor chat widget.

== Frequently Asked Questions ==

= Does it work without paying WeblyArts? =

The plugin code is free and GPL. The LLM, RAG, and MCP backends are a paid (or trial) **service**. That is allowed as Software as a Service: all PHP in this zip stays available; the APIs may return 401/403/429.

= Does the plugin phone home before I connect? =

No. Until you save or connect a WeblyToken, the plugin does not call AgentHub, RAG, or MCP.

= Where do updates come from? =

When hosted on WordPress.org, plugin updates come from the Plugin Directory only.

== Screenshots ==

1. Plan picker before connect. Choose a WeblySuite plan and start the console OAuth flow.
2. Connected dashboard. Token status, plan quotas, and disconnect.
3. Wallet PAYG and upgrade cards after the site is linked.

== Privacy ==

After you connect a tenant token, this site may send to WeblyArts:

* Chat messages and session ids (visitor widget, via AgentHub)
* Knowledge content you choose to ingest (via WeblyRAG)
* Tool calls you enable (via WeblyMCP)
* Site name and billing snapshot requests (via WeblySuite)

See https://weblyarts.com/en/privacy and https://suite.weblyarts.com/terms-of-service-en/

== Changelog ==

= 0.2.5 =
* WordPress.org listing: slug `weblyconnect`, display name WeblyConnect.
* OAuth connect requires a valid CSRF `state` before token exchange.
* Release zip no longer ships bundled `.po` translation files.

= 0.2.4 =
* Plan cards and quota snapshot show monthly ecosystem request ceilings (then PAYG).
* Plugin Check (plugin_repo): translators comments, wp_remote HTTP clients, no CDN updater file.

= 0.2.0 =
* WordPress.org submission: GPL headers, readme, uninstall.
* Guideline 5/6: no local quota lock on included code; Hub/RAG enforce plan limits.
* Guideline 8: CDN plugin updater is not loaded.

= 0.1.35 =
* Internal / CDN releases (pre-directory).

== Upgrade Notice ==

= 0.2.5 =
First WordPress.org directory release (slug weblyconnect). Connect still requires a WeblySuite account.
