=== Snakk AI Chat and Voice ===
Contributors: snakk
Tags: chatbot, ai, voice, customer support
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your Snakk agent to WordPress with visitor-initiated AI chat or browser voice. A Snakk account is required.

== Description ==

Snakk AI Chat and Voice connects your website to the existing Snakk service. Choose one AI chat widget or one browser voice widget. No page-builder add-on is required. The plugin uses the standard WordPress frontend hooks used by classic themes, block themes and Elementor pages.

* A standard Settings page with a public agent ID, widget selection and position.
* Disabled until an administrator enables it.
* A local load button: no Snakk requests before a visitor chooses to load the service.
* Voice calls require a separate click and browser microphone permission.
* No API secrets, arbitrary scripts, analytics or WordPress visitor records are stored by the plugin.
* Translation-ready interface, with language packs managed through WordPress.org.

The plugin is free and has no local feature paywall or expiry. A Snakk account and configured agent are required. Snakk subscriptions and usage may be paid; see [current service pricing](https://snakk.ai/priser). Website hosting is separate. Browser voice does not provision telephone numbers or enable AI telephony.

Chat and browser voice currently use separate Snakk runtimes. Choose one per site; this release does not combine both in a single panel. Chat appearance and its final position are configured in Snakk. The plugin position setting controls the initial load button and the browser voice button.

= External service and privacy =

Service: [Snakk](https://snakk.ai/), operated through https://platform.snakk.ai/ and https://api.snakk.ai/.

Purpose: provide configured AI chat or browser voice conversations using your Snakk account. This is a service connector, not a standalone AI backend.

After the visitor clicks Load chat or Load voice assistant, the plugin loads one service script from https://platform.snakk.ai/chat-embed.js or https://platform.snakk.ai/embed.js. Requests reveal IP address and standard HTTP metadata to the service. Chat fetches configuration and may create a visitor identifier in localStorage. Opening chat can create a service session and send public agent ID, visitor ID, current page URL, referrer and browser information. Messages and contact details are transmitted when submitted. Avoid putting sensitive values in page URLs.

Voice loads the LiveKit client from https://platform.snakk.ai/vendor/livekit-client-2.22.3.umd.min.js when the voice button is used. It requests a session from api.snakk.ai, then connects to the LiveKit endpoint returned by the service. Microphone audio is sent only after user action and permission. Service-side providers and processing are governed by your Snakk agreement and privacy policy. No microphone access, conversation session or AI request is initiated by the local load button itself.

Review [Snakk terms](https://snakk.ai/vilkar) and [Snakk privacy policy](https://snakk.ai/personvern). Explain this processing in your own site's privacy notice and configure any consent-management requirements for your site. The load control is not a complete consent-management platform.

Deactivation stops plugin loading on subsequent uncached page views and retains settings. Deletion removes this plugin's settings on all sites in a multisite network. Existing open browser tabs, browser storage and data in Snakk are not erased. Manage service records through Snakk. Purge caches after enabling, changing, deactivating or deleting the plugin.

== Installation ==

1. Upload snakk-ai-1.0.1.zip at Plugins > Add New Plugin > Upload Plugin, then activate.
2. Open Settings > Snakk AI.
3. Copy only your public agent ID from the embed code at https://platform.snakk.ai/.
4. In Snakk, enable the selected feature and add the exact website hostname to the agent's allowed domains. Include the production and staging hosts as needed.
5. Select AI chat or Browser voice. Enable Snakk and save.
6. Remove older Snakk embed snippets from your theme, Elementor or tag manager, and purge page caches.
7. Open a public page. Choose Load chat or Load voice assistant. For voice, click Talk to us separately and permit the microphone when you want to begin a call.

Use HTTPS on production sites. Themes must implement wp_head() and wp_footer(). Keep the loader and service scripts excluded from JavaScript combination or delayed-execution rewrites that remove data attributes.

== Frequently Asked Questions ==

= Is installation free? =
Yes. This GPL plugin is free. Snakk account subscriptions or consumption and your WordPress hosting are separate.

= Does chat include voice? =
The verified chat runtime is text chat. This release lets you select the separate browser voice runtime instead. AI telephony is a separate Snakk product.

= Does it work with Elementor and block themes? =
It loads globally through WordPress hooks, outside page content. No Elementor dependency, custom block or shortcode is needed. Only one widget is supported per document.

= Does it call Snakk automatically? =
No. The visitor must first click the local load button. Opening the chat and sending messages are further actions. Starting voice requires clicking the voice button and granting microphone access.

= Why is the widget blocked? =
Verify the public agent ID, selected feature and allowed hostnames in Snakk. A public agent ID is not an authentication secret. Domain enforcement is performed by the Snakk backend; the plugin does not override it. A blank allowlist has different behaviour in the current chat and voice backends, so explicitly configure domains.

= What about single-page navigation? =
The loader is a document singleton and preserves its widget across content replacement. Full navigation starts a fresh document. Applications that replace the entire document or change agents dynamically should use full navigation. Uninstall cannot close an already-open remote session in another browser tab.

== Screenshots ==

1. The real WordPress settings page, using a nonfunctional test agent ID.
2. The local load button on a real WordPress frontend, before connecting to Snakk.

== Changelog ==

= 1.0.1 =
* Use WordPress.org language packs instead of bundled translations and manual text-domain loading.
* Update the external-service disclosure to reflect Snakk-hosted LiveKit.

= 1.0.0 =
* Initial release with visitor-initiated chat or browser voice, validated settings and uninstall cleanup.
