=== SiteGlue Connector ===
Contributors: siteglueai
Tags: ai, schema, robots, sitemap, rest-api
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A SiteGlue deployment connector. It applies approved ARO discovery files through allowlisted WordPress operations — not remote PHP.

== Description ==

SiteGlue Connector lets a site owner connect a WordPress site to SiteGlue Cloud so Tony, the AI Webmaster, can apply **approved** Agent Readiness (ARO) fixes.

The plugin does **not** download or execute AI-generated PHP or JavaScript. SiteGlue sends structured JSON jobs. This plugin validates them and uses its own hooks to publish:

* JSON-LD from facts you confirm
* robots.txt AI crawler hints and a Content-Signal line
* Sitemap **discovery** for `/sitemap.xml`, `/wp-sitemap.xml`, or `/sitemap_index.xml` (it does not invent page URLs)
* HTTP Link headers
* Homepage markdown when a client sends `Accept: text/markdown`
* Optional llms.txt, MCP server card, RFC 9727 api-catalog, identity-only A2A card, auth.md, and ARD

You can publish the same files locally from Settings without a SiteGlue account. Pairing with SiteGlue uses a one-time code. The plugin never asks for a WordPress administrator password.

Installing this plugin does not guarantee a higher ARO score, rankings, or more customers.

== External services ==

This plugin can connect to SiteGlue Cloud (https://www.siteglue.ai) when you generate a pairing code and complete connection in a SiteGlue account.

* **What:** SiteGlue audits the public website, shows proposed fixes, and sends allowlisted JSON jobs. This plugin queues those jobs until you tick each item on Settings → SiteGlue Connector.
* **When:** Only after you generate a pairing code and confirm the connection. Local "Publish supported files" does not call SiteGlue.
* **Data sent:** Site URL, plugin version, selected operation name, and the approved payload (business facts, flags). Job results (success/error) are stored in SiteGlue's deployment audit log.
* **MCP check:** Saving an MCP endpoint URL fetches that URL from this WordPress site to confirm it speaks the Model Context Protocol. An unvalidated URL is not stored and is not published to /.well-known/mcp.json.
* **Terms:** https://www.siteglue.ai/terms-of-service
* **Privacy:** https://www.siteglue.ai/privacy-policy

The plugin does not edit theme PHP files, install other plugins from SiteGlue servers, or iframe SiteGlue into wp-admin.

== Installation ==

1. Upload the `siteglue-connector` folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins screen.
3. Go to Settings → SiteGlue Connector. Fill in business facts already published on your site.
4. Click **Publish supported files** for a local ARO publish, or **Generate pairing code** to connect SiteGlue Cloud.

WP-CLI:

`wp plugin install https://www.siteglue.ai/resources/wordpress-plugin/siteglue-connector.zip --activate`

== Frequently Asked Questions ==

= Does this modify my theme PHP? =

No. Output uses WordPress hooks (`wp_head`, `send_headers`, `robots_txt`, `template_redirect`).

= Can Tony change my site from chat with my admin password? =

No. Do not paste WordPress passwords into chat. Use the pairing code on this settings screen. Incoming jobs wait on Review & approve. Each change is unchecked until you tick it.

= Does deactivating the plugin disconnect SiteGlue? =

Yes. Deactivating revokes SiteGlue access immediately. Your saved business facts stay until you uninstall.

= Will this duplicate Yoast or Rank Math schema? =

Capabilities discovery reports those plugins when they are active. If you apply SiteGlue JSON-LD as well, disable duplicate Organization schema in the SEO plugin after you verify the public HTML.

== Changelog ==

= 1.0.1 =
* Queue SiteGlue jobs for per-item owner approval. Unchecked items are not applied.
* Validate the MCP endpoint live before saving or publishing /.well-known/mcp.json.
* Verify published files, including homepage markdown Accept behaviour.
* Restore individual logged changes. Deactivating the plugin revokes SiteGlue access.
* Pre-fill business facts from the site title, admin email, and Yoast Organization data without overwriting saved values.

= 1.0.0 =
* Initial connector: pairing, capabilities, signed jobs, ARO output, snapshot rollback.
