@relvehq/agent-ready 0.3.0 → 0.4.0
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.
- package/README.md +24 -3
- package/SETUP.md +354 -354
- package/dist/core/report.d.ts +9 -3
- package/dist/core/report.js +30 -10
- package/dist/core/version.d.ts +1 -0
- package/dist/core/version.js +8 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -1
- package/dist/refine/check.d.ts +3 -1
- package/dist/refine/check.js +43 -0
- package/dist/refine/remote.d.ts +3 -2
- package/dist/refine/remote.js +3 -2
- package/dist/wp/relve-agent-ready/includes/class-relve-ar-admin.php +560 -550
- package/dist/wp/relve-agent-ready/includes/class-relve-ar-converter.php +762 -762
- package/dist/wp/relve-agent-ready/includes/class-relve-ar-llms.php +192 -192
- package/dist/wp/relve-agent-ready/includes/class-relve-ar-markdown-builder.php +455 -455
- package/dist/wp/relve-agent-ready/includes/class-relve-ar-negotiation.php +334 -334
- package/dist/wp/relve-agent-ready/includes/class-relve-ar-refiner.php +894 -894
- package/dist/wp/relve-agent-ready/includes/class-relve-ar-reporter.php +147 -0
- package/dist/wp/relve-agent-ready/includes/class-relve-ar-response.php +226 -226
- package/dist/wp/relve-agent-ready/includes/class-relve-ar-router.php +422 -421
- package/dist/wp/relve-agent-ready/includes/class-relve-ar-settings.php +210 -201
- package/dist/wp/relve-agent-ready/includes/class-relve-ar-store.php +583 -583
- package/dist/wp/relve-agent-ready/includes/index.php +2 -2
- package/dist/wp/relve-agent-ready/index.php +2 -2
- package/dist/wp/relve-agent-ready/readme.txt +119 -108
- package/dist/wp/relve-agent-ready/relve-agent-ready.php +82 -81
- package/dist/wp/relve-agent-ready/uninstall.php +35 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -104,7 +104,7 @@ frameworks" below. For WordPress, the plugin ships inside this package
|
|
|
104
104
|
| `enabled` | `AGENT_READY_ENABLED` is `1` or `true` |
|
|
105
105
|
| `exclude` | `/api`, `/_next`, auth and admin paths, plus common private pages (account, checkout, cart, dashboard, settings, billing…) and yours; `excludeCommon: false` drops the common list |
|
|
106
106
|
| `llms` | `/llms.txt` built from your `sitemap.xml`; `llms: false` for none |
|
|
107
|
-
| `onHit` | sends each visit to
|
|
107
|
+
| `onHit` | sends each visit's stats to Relve when `AGENT_READY_KEY` is set (opt-in; `AGENT_READY_ENDPOINT` for another dashboard), see [Share visit stats](#share-visit-stats-with-relve-opt-in) |
|
|
108
108
|
|
|
109
109
|
Anything you pass wins:
|
|
110
110
|
|
|
@@ -186,9 +186,13 @@ Markdown. The command saves `<out>/<path>.md` plus `<out>/<path>.json`
|
|
|
186
186
|
(default out: `.agent-ready/md`).
|
|
187
187
|
|
|
188
188
|
- **Cost:** your own OpenAI usage, one model call per changed page (roughly
|
|
189
|
-
a few thousand tokens each with the default `gpt-4o
|
|
189
|
+
a few thousand tokens each with the default `gpt-4o`, about 1 to 2 cents a
|
|
190
|
+
page). Relve charges nothing.
|
|
190
191
|
- **Your key:** used for that call only. Relve does not store or log it, and
|
|
191
192
|
it is never written to the output files.
|
|
193
|
+
- **What Relve logs:** for each call, the page URL, the model, the outcome
|
|
194
|
+
and the size of the result (bytes, words, lines, tokens, headings, links,
|
|
195
|
+
tables). Not the HTML, not the Markdown, not your key.
|
|
192
196
|
- **Re-run when content changes.** Each saved `.json` holds the page's
|
|
193
197
|
fingerprint; it is sent along, and an unchanged page comes back as
|
|
194
198
|
`unchanged` with no model call (free). `--force` rewrites everything.
|
|
@@ -198,7 +202,7 @@ Markdown. The command saves `<out>/<path>.md` plus `<out>/<path>.json`
|
|
|
198
202
|
| Option | |
|
|
199
203
|
|---|---|
|
|
200
204
|
| `--sitemap` / `--paths /a,/b` | which pages (sitemap at `<site>/sitemap.xml`) |
|
|
201
|
-
| `--model` | `gpt-4o
|
|
205
|
+
| `--model` | `gpt-4o` (default, most accurate), `gpt-4.1`, `gpt-4.1-mini`, `gpt-4o-mini` (cheapest; can mix up whose price is whose on busy pages) |
|
|
202
206
|
| `--site-name` | your brand name, used in the documents |
|
|
203
207
|
| `--out`, `--limit`, `--concurrency` (2), `--force`, `--dry-run` | `--dry-run` lists the pages: no API call, nothing written |
|
|
204
208
|
| `AGENT_READY_REFINE_ENDPOINT` | another API URL (testing) |
|
|
@@ -287,6 +291,23 @@ writes a log that `npx agent-ready stats --log <file>` summarises. On
|
|
|
287
291
|
serverless hosts (Vercel, Amplify) memory and local files don't last between
|
|
288
292
|
requests: implement `HitStore` on your database.
|
|
289
293
|
|
|
294
|
+
### Share visit stats with Relve (opt-in)
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
AGENT_READY_KEY=ar_live_yoursite
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
With that one variable set, `createAgentReady` reports each Markdown request
|
|
301
|
+
an agent makes to `https://relvehq.com/api/agent-ready/v1/hits`: your key, the
|
|
302
|
+
package version, the time, host, path, how the Markdown was asked for, where
|
|
303
|
+
it came from, status, tokens, bytes, the agent's user agent and the time
|
|
304
|
+
taken. Never the Markdown and never the visitor's IP. The report is
|
|
305
|
+
fire-and-forget with a 2 second timeout and never changes the agent's
|
|
306
|
+
response. The key is a label you choose (`ar_` plus 3 to 64 letters, digits,
|
|
307
|
+
`_` or `-`), not a secret. Without it nothing is sent.
|
|
308
|
+
`AGENT_READY_ENDPOINT` sends the same reports to another dashboard instead;
|
|
309
|
+
in code, `reporter({ key, endpoint? })` is the `onHit`.
|
|
310
|
+
|
|
290
311
|
## Other frameworks
|
|
291
312
|
|
|
292
313
|
Express, Connect, Polka, Fastify (via `@fastify/middie`) or a plain `http`
|