=== Bastian Assistant ===
Contributors: heybastian
Tags: chat, chatbot, assistant, ai, support
Requires at least: 6.0
Tested up to: 7.1
Stable tag: 1.0.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds Bastian, a site-specific AI chat assistant with PsiGuard cognitive monitoring, to your website.

== Description ==

Bastian is a hosted AI chat assistant that answers visitor questions about *your* site — what it is, what it offers, how to get started, who to contact. It deliberately stays in its lane: it is not a general-purpose chatbot and will politely decline off-topic requests.

Every reply Bastian gives passes through PsiGuard, a monitoring layer that checks the assistant's reasoning in real time and steadies it if it starts to drift, so visitors get accurate, on-topic answers.

**An account is required.** Bastian is a hosted service (like a live-chat provider). This plugin is the connector: you sign up at [heybastian.com](https://heybastian.com), get a license key (a free tier is available), paste it into the plugin's settings, and the chat widget appears on your site. All AI processing happens on the Bastian service — nothing heavy runs on your server.

= Features =

* Site-specific assistant that answers from notes and FAQs you control from your Bastian dashboard
* Real-time PsiGuard monitoring on every reply
* Free tier available; paid plans raise the monthly conversation limit
* Widget appearance (greeting, colors, position) configured from your Bastian dashboard
* Optional "Protected by" credit — off by default, entirely your choice
* Hide the widget for logged-in users (so your own testing doesn't count against your allowance)
* Exclude the widget on specific pages or posts by ID or slug
* One-click license re-check from the settings screen

== External services ==

This plugin connects to the Bastian service (operated by PsiCo) at heybastian.com. It is required for the plugin to function — the plugin is an interface to this hosted service.

**What is sent, and when:**

* When you save your license key in the plugin settings, the license key and your site's URL are sent to the service to validate the key.
* When the chat widget loads on your site, the license key and your site's hostname are sent to fetch your widget settings.
* When a visitor sends a chat message, the following are sent to generate a reply: the message itself, the recent conversation history, the visible text of the page the visitor is viewing (so Bastian can answer questions about what's on screen), a randomly generated visitor identifier stored in the visitor's browser, the license key, and your site's hostname.

Conversation history is stored in the visitor's own browser (localStorage), not in WordPress.

Service terms: https://heybastian.com/terms
Privacy policy: https://heybastian.com/privacy

== Installation ==

1. Install and activate the plugin.
2. Sign up at https://heybastian.com and copy your license key from your dashboard (free tier available).
3. In WordPress, go to Settings → Bastian Assistant, paste your key, and save.
4. The chat widget appears on your site. Customize its look and knowledge from your Bastian dashboard.

== Frequently Asked Questions ==

= Do I need a paid account? =

No. The free tier includes a monthly allowance of conversations. Paid plans raise the limit.

= Does the AI run on my server? =

No. Your site only loads a small widget script. All AI processing happens on the Bastian service.

= Can Bastian answer questions unrelated to my site? =

By design, no. Bastian declines general-knowledge requests (homework, coding, etc.) and redirects visitors to what it can help with on your site.

= What data do my visitors share? =

See the "External services" section above. The plugin also adds suggested wording to your WordPress privacy-policy helper (Settings → Privacy).

= Can I turn off the "Protected by" link? =

It is off by default. You can enable it in the plugin settings if you'd like to show it.

= Can I hide the widget on certain pages? =

Yes. In the plugin settings you can hide the widget for logged-in users, and exclude specific pages or posts by listing their IDs or slugs.

= Why do appearance and knowledge settings live on heybastian.com instead of in WordPress? =

Bastian is a hosted service, and many owners run the same assistant on more than one site. Keeping the widget's look, greeting, notes, and FAQs in the Bastian dashboard means one set of settings applies everywhere, instantly, without redeploying anything. The plugin handles the WordPress side: connecting your key and controlling where the widget appears.

== Screenshots ==

1. The Bastian chat widget on a page.
2. The plugin settings screen.

== Changelog ==

= 1.0.1 =
* Badge wording updated to "Protected by PsiGuard" throughout the settings screen and readme.
* Instructions now refer to the Bastian dashboard (renamed from "console") to match the website.

= 1.0.0 =
* Initial release: license validation, widget embed, branding opt-in, privacy-policy suggested text, visibility controls (hide for logged-in users, per-page exclusions), and one-click license re-check.

== Upgrade Notice ==

= 1.0.1 =
Wording refresh: the optional badge is now "Protected by PsiGuard." No settings are changed by this update.

= 1.0.0 =
Initial release.
