@relvehq/agent-ready 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- <?php
2
- // Silence is golden.
1
+ <?php
2
+ // Silence is golden.
@@ -1,2 +1,2 @@
1
- <?php
2
- // Silence is golden.
1
+ <?php
2
+ // Silence is golden.
@@ -1,75 +1,112 @@
1
- === Relve Agent Ready ===
2
- Contributors: relve
3
- Tags: markdown, llms.txt, ai, agents, seo
4
- Requires at least: 6.0
5
- Tested up to: 6.7
6
- Requires PHP: 7.4
7
- Stable tag: 0.1.0
8
- License: MIT
9
- License URI: https://opensource.org/licenses/MIT
10
-
11
- Serve a clean Markdown version of your posts and pages to AI agents, plus an llms.txt. Browsers always get the normal page.
12
-
13
- == Description ==
14
-
15
- AI agents and coding assistants (Claude Code, Cursor, Copilot and others) read the web better as Markdown than as themed HTML. Relve Agent Ready answers them with Markdown built from WordPress's own data, while every browser keeps getting your normal page.
16
-
17
- An agent can ask in three ways:
18
-
19
- * `Accept: text/markdown` on any post or page URL, when it prefers Markdown over (or equally to) HTML. A browser's Accept header, `*/*`, or no header never gets Markdown. The user agent is never used to decide.
20
- * `<permalink>.md`, for example `https://example.com/my-post.md` (the home page is `/index.md`).
21
- * `<permalink>?format=md`.
22
-
23
- What it serves:
24
-
25
- * Posts and pages (published, public, not password-protected, of the post types you enable): YAML front matter (title, canonical, author, published, modified, categories, tags, description, source), one `# Title` heading, the featured image and the content converted to Markdown (headings, lists, links, images, tables, code blocks).
26
- * The posts front page and category, tag and author archives: a heading and a list of their latest 50 posts.
27
- * `llms.txt` under your home path: your site name, tagline and links to the `.md` version of up to 200 recent posts and pages.
28
- * Refined files: upload the zip Relve produces for your site and those hand-checked Markdown files are served first.
29
-
30
- Response headers: `Content-Type: text/markdown; charset=utf-8`, `Vary: Accept`, `Link: <permalink>; rel="canonical"`, `X-Robots-Tag: noindex` (search engines keep indexing your HTML page), `x-markdown-tokens`, `ETag` (304 on `If-None-Match`), `x-agent-ready-source: native | stored | llms`. Markdown asked for by `Accept` is sent with `Cache-Control: private, max-age=300`; `.md`, `?format=md` and llms.txt with `Cache-Control: public, s-maxage=300, stale-while-revalidate=86400`.
31
-
32
- The plugin is installed switched off. Nothing changes until you tick "Enabled" in Settings -> Agent Ready.
33
-
34
- == Installation ==
35
-
36
- 1. Upload the `relve-agent-ready` zip in Plugins -> Add New -> Upload Plugin, then activate it.
37
- 2. Go to Settings -> Agent Ready, tick "Enabled" and save.
38
- 3. Optional: choose post types, add excluded paths, pick the llms.txt mode.
39
- 4. Optional: upload the refined-files zip Relve sent you.
40
- 5. Run the three test commands shown in the Status panel.
41
-
42
- == Frequently Asked Questions ==
43
-
44
- = Will this change what my visitors or Google see? =
45
-
46
- No. Browsers send an Accept header that prefers HTML, so they get your normal page. Markdown responses carry `X-Robots-Tag: noindex` and a canonical link to the HTML page.
47
-
48
- = My site sits behind Cloudflare, a Worker or another proxy. What must it pass through? =
49
-
50
- The `Accept` header, paths ending in `.md`, the `format` query parameter and `/llms.txt` (under your home path) must reach WordPress unchanged. If the proxy caches pages, it should either include `Accept` in its cache key or not cache responses marked `Cache-Control: private`. `?format=md` works through any proxy that forwards the query string.
51
-
52
- = I use WP Rocket or another page cache. =
53
-
54
- The plugin sets `DONOTCACHEPAGE` on every Markdown response and tells WP Rocket never to cache `.md` URLs or llms.txt. A page cache that already holds the HTML of a page may still answer an `Accept: text/markdown` request with that HTML. That is safe (the agent gets the normal page); the `.md` URL always returns Markdown.
55
-
56
- = I use Yoast SEO. =
57
-
58
- The description in the front matter uses your Yoast meta description when there is one. If Yoast's own llms.txt feature is on, the "auto" mode leaves llms.txt to Yoast; choose "On" to serve this plugin's version instead.
59
-
60
- = What is in the refined-files zip? =
61
-
62
- A top-level `md/` folder with one `.md` file per URL path (`/` is `md/index.md`, `/blog/my-post/` is `md/blog/my-post.md`). Other files (such as `.json` sidecars) are skipped. Entries outside `md/`, absolute paths and paths containing `..` are rejected. Uploading replaces the stored set. Files are kept in `wp-content/uploads/relve-agent-ready/md/`, behind a deny-all `.htaccess`, and are only ever sent as text.
63
-
64
- = Which pages are never served? =
65
-
66
- Drafts, private and password-protected posts, post types you did not enable, search results, feeds, 404s and any path in the excluded list (by default `/wp-admin`, `/wp-login.php`, `/wp-json`, `/feed`, `/cart`, `/checkout`, `/my-account`, `/account` and WordPress's own folders). An `Accept` request for those gets WordPress's normal response; a `.md` or `?format=md` request gets a plain-text 404.
67
-
68
- = What happens when I uninstall? =
69
-
70
- Deactivating flushes rewrite rules and removes the WP Rocket rules. Deleting the plugin also removes its settings and the refined-files folder.
71
-
72
- == Changelog ==
73
-
74
- = 0.1.0 =
75
- * First release: Markdown for posts, pages, the front page and archives via Accept, `.md` and `?format=md`; llms.txt; refined-files upload; WP Rocket and Yoast awareness; settings page with status and test commands.
1
+ === Relve Agent Ready ===
2
+ Contributors: relve
3
+ Tags: markdown, llms.txt, ai, agents, seo
4
+ Requires at least: 6.0
5
+ Tested up to: 6.7
6
+ Requires PHP: 7.4
7
+ Stable tag: 0.2.1
8
+ License: MIT
9
+ License URI: https://opensource.org/licenses/MIT
10
+
11
+ Serve a clean Markdown version of your posts and pages to AI agents, plus an llms.txt. Browsers always get the normal page.
12
+
13
+ == Description ==
14
+
15
+ AI agents and coding assistants (Claude Code, Cursor, Copilot and others) read the web better as Markdown than as themed HTML. Relve Agent Ready answers them with Markdown built from WordPress's own data, while every browser keeps getting your normal page.
16
+
17
+ An agent can ask in three ways:
18
+
19
+ * `Accept: text/markdown` on any post or page URL, when it prefers Markdown over (or equally to) HTML. A browser's Accept header, `*/*`, or no header never gets Markdown. The user agent is never used to decide.
20
+ * `<permalink>.md`, for example `https://example.com/my-post.md` (the home page is `/index.md`).
21
+ * `<permalink>?format=md`.
22
+
23
+ What it serves:
24
+
25
+ * Posts and pages (published, public, not password-protected, of the post types you enable): YAML front matter (title, canonical, author, published, modified, categories, tags, description, source), one `# Title` heading, the featured image and the content converted to Markdown (headings, lists, links, images, tables, code blocks).
26
+ * The posts front page and category, tag and author archives: a heading and a list of their latest 50 posts.
27
+ * `llms.txt` under your home path: your site name, tagline and links to the `.md` version of up to 200 recent posts and pages.
28
+ * Rewritten files: with your own OpenAI key, each post is rewritten into clean Markdown with Relve's prompt (see below) and served first.
29
+ * Refined files: upload a zip of Markdown files (a top-level `md/` folder) and those files are served first.
30
+
31
+ Response headers: `Content-Type: text/markdown; charset=utf-8`, `Vary: Accept`, `Link: <permalink>; rel="canonical"`, `X-Robots-Tag: noindex` (search engines keep indexing your HTML page), `x-markdown-tokens`, `ETag` (304 on `If-None-Match`), `x-agent-ready-source: native | stored | llms`. Markdown asked for by `Accept` is sent with `Cache-Control: private, max-age=300`; `.md`, `?format=md` and llms.txt with `Cache-Control: public, s-maxage=300, stale-while-revalidate=86400`.
32
+
33
+ The plugin is installed switched off. Nothing changes until you tick "Enabled" in Settings -> Agent Ready.
34
+
35
+ = Better Markdown with your own OpenAI key =
36
+
37
+ The Markdown built from WordPress is faithful but plain. For agent-ready pages that read well (a clear summary, clean headings, tables kept, theme clutter gone), save your OpenAI API key in Settings -> Agent Ready:
38
+
39
+ * When a post of an enabled type is published or updated, WP-Cron sends it about 30 seconds later (never while you wait on the editor) to Relve's refine service at `https://relvehq.com/api/agent-ready/v1/refine`: the permalink, and a small HTML page with the title, description, canonical link, structured data and the rendered content.
40
+ * Relve rewrites it with its own prompt, using your key for that single OpenAI call, checks the result and sends back the Markdown. The plugin stores it as that post's file in `wp-content/uploads/relve-agent-ready/md/`; it is served first (`x-agent-ready-source: stored`).
41
+ * A post that has not changed since its last rewrite is answered "unchanged" without a model call, so it costs nothing.
42
+ * "Rewrite all now" queues every published post of the enabled types; WP-Cron works through them 5 at a time. The settings page shows progress, posts rewritten, the last run and the last error code.
43
+ * If OpenAI rejects the key or the account is out of quota, rewriting pauses and an admin notice says so. Saving a new key resumes it.
44
+ * Unpublishing or deleting a post deletes its rewritten file. If a rewrite fails, the previous file (or the Markdown built from WordPress) keeps being served.
45
+ * Models: `gpt-4o` (default, the most accurate; about 1 to 2 cents a post), `gpt-4.1`, `gpt-4.1-mini`, `gpt-4o-mini` (cheapest; can mix up whose price is whose on busy pages). Every call spends your own OpenAI key; no Relve account is needed.
46
+ * When Relve improves its prompt, each post is rewritten once on its next run, even if the post itself has not changed.
47
+
48
+ The key is stored in your site's own options, shown masked (`sk-...abcd`) and only ever sent to the Relve endpoint over https, with redirects disabled. A developer can point the plugin at another endpoint with the `RELVE_AR_REFINE_ENDPOINT` constant or the `relve_ar_refine_endpoint` filter; anything other than https (or http on localhost, for testing) is refused and the key is not sent.
49
+
50
+ == Installation ==
51
+
52
+ 1. Upload the `relve-agent-ready` zip in Plugins -> Add New -> Upload Plugin, then activate it.
53
+ 2. Go to Settings -> Agent Ready, tick "Enabled" and save.
54
+ 3. Optional: choose post types, add excluded paths, pick the llms.txt mode.
55
+ 4. Optional: paste your OpenAI API key, save, then click "Rewrite all now".
56
+ 5. Run the three test commands shown in the Status panel.
57
+
58
+ == Frequently Asked Questions ==
59
+
60
+ = Will this change what my visitors or Google see? =
61
+
62
+ No. Browsers send an Accept header that prefers HTML, so they get your normal page. Markdown responses carry `X-Robots-Tag: noindex` and a canonical link to the HTML page.
63
+
64
+ = My site sits behind Cloudflare, a Worker or another proxy. What must it pass through? =
65
+
66
+ The `Accept` header, paths ending in `.md`, the `format` query parameter and `/llms.txt` (under your home path) must reach WordPress unchanged. If the proxy caches pages, it should either include `Accept` in its cache key or not cache responses marked `Cache-Control: private`. `?format=md` works through any proxy that forwards the query string.
67
+
68
+ = I use WP Rocket or another page cache. =
69
+
70
+ The plugin sets `DONOTCACHEPAGE` on every Markdown response and tells WP Rocket never to cache `.md` URLs or llms.txt. A page cache that already holds the HTML of a page may still answer an `Accept: text/markdown` request with that HTML. That is safe (the agent gets the normal page); the `.md` URL always returns Markdown.
71
+
72
+ = I use Yoast SEO. =
73
+
74
+ The description in the front matter uses your Yoast meta description when there is one. If Yoast's own llms.txt feature is on, the "auto" mode leaves llms.txt to Yoast; choose "On" to serve this plugin's version instead.
75
+
76
+ = Does Relve see my OpenAI key? =
77
+
78
+ It passes through Relve's server for the single call that rewrites a post: the plugin sends it in a request header over https, Relve uses it for that one OpenAI call, and does not store or log it. It is never returned and never written to a database, file or cache on Relve's side. On your site it is kept in the plugin's option in your own database, like other plugin API keys, and is never shown in full on the settings page. Relve also receives the post's public permalink and content, which are public anyway. Remove the key at any time with "Remove the saved key"; deleting the plugin deletes it too.
79
+
80
+ = What does rewriting cost? =
81
+
82
+ Your OpenAI usage for each rewrite (one model call per changed post, typically a few thousand tokens). Unchanged posts cost nothing.
83
+
84
+ = Why does the status say "rejected" or "too_little_text" for a post? =
85
+
86
+ `rejected` means the rewrite did not pass Relve's quality check twice; `too_little_text` means the post is too short to be worth rewriting. Nothing is stored for that post and the Markdown built from WordPress keeps being served.
87
+
88
+ = What is in the refined-files zip? =
89
+
90
+ A top-level `md/` folder with one `.md` file per URL path (`/` is `md/index.md`, `/blog/my-post/` is `md/blog/my-post.md`). Other files (such as `.json` sidecars) are skipped. Entries outside `md/`, absolute paths and paths containing `..` are rejected. Uploading replaces the stored set. Files are kept in `wp-content/uploads/relve-agent-ready/md/`, behind a deny-all `.htaccess`, and are only ever sent as text.
91
+
92
+ = Which pages are never served? =
93
+
94
+ Drafts, private and password-protected posts, post types you did not enable, search results, feeds, 404s and any path in the excluded list (by default `/wp-admin`, `/wp-login.php`, `/wp-json`, `/feed`, `/cart`, `/checkout`, `/my-account`, `/account` and WordPress's own folders). An `Accept` request for those gets WordPress's normal response; a `.md` or `?format=md` request gets a plain-text 404.
95
+
96
+ = What happens when I uninstall? =
97
+
98
+ Deactivating flushes rewrite rules, removes the WP Rocket rules and cancels scheduled rewrites. Deleting the plugin also removes its settings (including the OpenAI key), its rewrite status and post meta, and the refined-files folder.
99
+
100
+ == Changelog ==
101
+
102
+ = 0.2.1 =
103
+ * Default model is now gpt-4o: in testing, gpt-4o-mini sometimes gave the prices of example cards on a page to the page itself. gpt-4o-mini stays available.
104
+
105
+ = 0.2.0 =
106
+ * Better Markdown with your own OpenAI key: posts are rewritten with Relve's prompt through Relve's refine API, in WP-Cron, on publish and update.
107
+ * "Rewrite all now" works through all posts 5 at a time, with progress on the settings page.
108
+ * Status: key saved, posts rewritten, last run, last error code. Rewriting pauses with an admin notice when OpenAI rejects the key or the quota runs out.
109
+ * Unpublished and deleted posts lose their rewritten file. "Clear refined files" also resets the rewrite fingerprints.
110
+
111
+ = 0.1.0 =
112
+ * First release: Markdown for posts, pages, the front page and archives via Accept, `.md` and `?format=md`; llms.txt; refined-files upload; WP Rocket and Yoast awareness; settings page with status and test commands.
@@ -1,70 +1,81 @@
1
- <?php
2
- /**
3
- * Plugin Name: Relve Agent Ready
4
- * Plugin URI: https://relvehq.com/agent-md
5
- * Description: Serves a Markdown version of posts, pages and archives to AI agents (Accept: text/markdown, .md URLs, ?format=md) plus an llms.txt. Browsers are never affected. Off until enabled in Settings -> Agent Ready.
6
- * Version: 0.1.0
7
- * Requires at least: 6.0
8
- * Requires PHP: 7.4
9
- * Author: Relve
10
- * Author URI: https://relvehq.com
11
- * License: MIT
12
- * License URI: https://opensource.org/licenses/MIT
13
- * Text Domain: relve-agent-ready
14
- *
15
- * @package Relve_Agent_Ready
16
- */
17
-
18
- if ( ! defined( 'ABSPATH' ) ) {
19
- exit;
20
- }
21
-
22
- define( 'RELVE_AR_VERSION', '0.1.0' );
23
- define( 'RELVE_AR_FILE', __FILE__ );
24
- define( 'RELVE_AR_DIR', plugin_dir_path( __FILE__ ) );
25
-
26
- require_once RELVE_AR_DIR . 'includes/class-relve-ar-settings.php';
27
- require_once RELVE_AR_DIR . 'includes/class-relve-ar-negotiation.php';
28
- require_once RELVE_AR_DIR . 'includes/class-relve-ar-converter.php';
29
- require_once RELVE_AR_DIR . 'includes/class-relve-ar-markdown-builder.php';
30
- require_once RELVE_AR_DIR . 'includes/class-relve-ar-response.php';
31
- require_once RELVE_AR_DIR . 'includes/class-relve-ar-llms.php';
32
- require_once RELVE_AR_DIR . 'includes/class-relve-ar-store.php';
33
- require_once RELVE_AR_DIR . 'includes/class-relve-ar-router.php';
34
-
35
- /**
36
- * Activation: default settings (disabled), the refined-files folder with its
37
- * protection files, fresh rewrite rules and WP Rocket config.
38
- *
39
- * @return void
40
- */
41
- function relve_ar_activate() {
42
- add_option( Relve_AR_Settings::OPTION, Relve_AR_Settings::defaults() );
43
- $store = new Relve_AR_Store();
44
- $store->ensure();
45
- flush_rewrite_rules();
46
- add_filter( 'rocket_cache_reject_uri', array( 'Relve_AR_Router', 'rocket_reject_uri' ) );
47
- Relve_AR_Router::refresh_rocket();
48
- }
49
-
50
- /**
51
- * Deactivation: flush rewrite rules and drop our WP Rocket reject rules.
52
- * Settings and refined files are kept (uninstall removes them).
53
- *
54
- * @return void
55
- */
56
- function relve_ar_deactivate() {
57
- flush_rewrite_rules();
58
- remove_filter( 'rocket_cache_reject_uri', array( 'Relve_AR_Router', 'rocket_reject_uri' ) );
59
- Relve_AR_Router::refresh_rocket();
60
- }
61
-
62
- register_activation_hook( __FILE__, 'relve_ar_activate' );
63
- register_deactivation_hook( __FILE__, 'relve_ar_deactivate' );
64
-
65
- Relve_AR_Router::init();
66
-
67
- if ( is_admin() ) {
68
- require_once RELVE_AR_DIR . 'includes/class-relve-ar-admin.php';
69
- Relve_AR_Admin::init();
70
- }
1
+ <?php
2
+ /**
3
+ * Plugin Name: Relve Agent Ready
4
+ * Plugin URI: https://relvehq.com/agent-md
5
+ * Description: Serves a Markdown version of posts, pages and archives to AI agents (Accept: text/markdown, .md URLs, ?format=md) plus an llms.txt. Optionally rewrites posts into better Markdown with Relve's prompt and your own OpenAI key. Browsers are never affected. Off until enabled in Settings -> Agent Ready.
6
+ * Version: 0.2.1
7
+ * Requires at least: 6.0
8
+ * Requires PHP: 7.4
9
+ * Author: Relve
10
+ * Author URI: https://relvehq.com
11
+ * License: MIT
12
+ * License URI: https://opensource.org/licenses/MIT
13
+ * Text Domain: relve-agent-ready
14
+ *
15
+ * @package Relve_Agent_Ready
16
+ */
17
+
18
+ if ( ! defined( 'ABSPATH' ) ) {
19
+ exit;
20
+ }
21
+
22
+ define( 'RELVE_AR_VERSION', '0.2.1' );
23
+ define( 'RELVE_AR_FILE', __FILE__ );
24
+ define( 'RELVE_AR_DIR', plugin_dir_path( __FILE__ ) );
25
+
26
+ // The Relve refine endpoint. Define it in wp-config.php to override (https
27
+ // only; http is accepted for localhost). Also filterable:
28
+ // relve_ar_refine_endpoint.
29
+ if ( ! defined( 'RELVE_AR_REFINE_ENDPOINT' ) ) {
30
+ define( 'RELVE_AR_REFINE_ENDPOINT', 'https://relvehq.com/api/agent-ready/v1/refine' );
31
+ }
32
+
33
+ require_once RELVE_AR_DIR . 'includes/class-relve-ar-settings.php';
34
+ require_once RELVE_AR_DIR . 'includes/class-relve-ar-negotiation.php';
35
+ require_once RELVE_AR_DIR . 'includes/class-relve-ar-converter.php';
36
+ require_once RELVE_AR_DIR . 'includes/class-relve-ar-markdown-builder.php';
37
+ require_once RELVE_AR_DIR . 'includes/class-relve-ar-response.php';
38
+ require_once RELVE_AR_DIR . 'includes/class-relve-ar-llms.php';
39
+ require_once RELVE_AR_DIR . 'includes/class-relve-ar-store.php';
40
+ require_once RELVE_AR_DIR . 'includes/class-relve-ar-router.php';
41
+ require_once RELVE_AR_DIR . 'includes/class-relve-ar-refiner.php';
42
+
43
+ /**
44
+ * Activation: default settings (disabled), the refined-files folder with its
45
+ * protection files, fresh rewrite rules and WP Rocket config.
46
+ *
47
+ * @return void
48
+ */
49
+ function relve_ar_activate() {
50
+ add_option( Relve_AR_Settings::OPTION, Relve_AR_Settings::defaults() );
51
+ $store = new Relve_AR_Store();
52
+ $store->ensure();
53
+ flush_rewrite_rules();
54
+ add_filter( 'rocket_cache_reject_uri', array( 'Relve_AR_Router', 'rocket_reject_uri' ) );
55
+ Relve_AR_Router::refresh_rocket();
56
+ }
57
+
58
+ /**
59
+ * Deactivation: flush rewrite rules, drop our WP Rocket reject rules and
60
+ * every scheduled rewrite. Settings and refined files are kept (uninstall
61
+ * removes them).
62
+ *
63
+ * @return void
64
+ */
65
+ function relve_ar_deactivate() {
66
+ Relve_AR_Refiner::unschedule_all();
67
+ flush_rewrite_rules();
68
+ remove_filter( 'rocket_cache_reject_uri', array( 'Relve_AR_Router', 'rocket_reject_uri' ) );
69
+ Relve_AR_Router::refresh_rocket();
70
+ }
71
+
72
+ register_activation_hook( __FILE__, 'relve_ar_activate' );
73
+ register_deactivation_hook( __FILE__, 'relve_ar_deactivate' );
74
+
75
+ Relve_AR_Router::init();
76
+ Relve_AR_Refiner::init();
77
+
78
+ if ( is_admin() ) {
79
+ require_once RELVE_AR_DIR . 'includes/class-relve-ar-admin.php';
80
+ Relve_AR_Admin::init();
81
+ }
@@ -1,24 +1,35 @@
1
- <?php
2
- /**
3
- * Uninstall: remove the option and the refined-files folder.
4
- *
5
- * @package Relve_Agent_Ready
6
- */
7
-
8
- if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
9
- exit;
10
- }
11
-
12
- require_once __DIR__ . '/includes/class-relve-ar-negotiation.php';
13
- require_once __DIR__ . '/includes/class-relve-ar-store.php';
14
-
15
- delete_option( 'relve_agent_ready' );
16
-
17
- if ( is_multisite() ) {
18
- delete_site_option( 'relve_agent_ready' );
19
- }
20
-
21
- $relve_ar_store = new Relve_AR_Store();
22
- $relve_ar_store->delete_all();
23
-
24
- flush_rewrite_rules();
1
+ <?php
2
+ /**
3
+ * Uninstall: remove the options (settings, including the OpenAI key; refine
4
+ * state; refine queue), the refine post meta, any scheduled rewrites and the
5
+ * refined-files folder.
6
+ *
7
+ * @package Relve_Agent_Ready
8
+ */
9
+
10
+ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
11
+ exit;
12
+ }
13
+
14
+ require_once __DIR__ . '/includes/class-relve-ar-negotiation.php';
15
+ require_once __DIR__ . '/includes/class-relve-ar-store.php';
16
+
17
+ foreach ( array( 'relve_agent_ready', 'relve_agent_ready_refine', 'relve_agent_ready_refine_queue' ) as $relve_ar_option ) {
18
+ delete_option( $relve_ar_option );
19
+ if ( is_multisite() ) {
20
+ delete_site_option( $relve_ar_option );
21
+ }
22
+ }
23
+ delete_transient( 'relve_ar_refine_lock' );
24
+
25
+ foreach ( array( '_relve_ar_fingerprint', '_relve_ar_refined_at', '_relve_ar_refined_path' ) as $relve_ar_meta_key ) {
26
+ delete_post_meta_by_key( $relve_ar_meta_key );
27
+ }
28
+
29
+ wp_unschedule_hook( 'relve_ar_refine_post' );
30
+ wp_unschedule_hook( 'relve_ar_refine_batch' );
31
+
32
+ $relve_ar_store = new Relve_AR_Store();
33
+ $relve_ar_store->delete_all();
34
+
35
+ flush_rewrite_rules();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relvehq/agent-ready",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "license": "MIT",
5
5
  "description": "Make your site agent-ready: serve every page as clean Markdown to AI agents (Accept: text/markdown, .md URLs, llms.txt), refine it with AI ahead of time, and prove it with a free checker and a visits dashboard. Next.js adapter included.",
6
6
  "keywords": [