@ainyc/canonry 4.23.1 → 4.24.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.
|
@@ -30,8 +30,14 @@ Two tables, populated from server-log adapters:
|
|
|
30
30
|
| `raw_event_samples` | Bounded forensic samples (≤100 per sync) for spot-checking |
|
|
31
31
|
|
|
32
32
|
Each `traffic_sources` row is one server-log integration for a project.
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
Adapters today:
|
|
34
|
+
|
|
35
|
+
| Adapter | Source | Best for |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `cloud-run` | GCP Cloud Run request logs via Logging API | Any service running on Cloud Run |
|
|
38
|
+
| `wordpress` | The Canonry Traffic Logger WP plugin's REST endpoint | WordPress sites where you control wp-admin |
|
|
39
|
+
|
|
40
|
+
Future adapters slot in by implementing the same contract.
|
|
35
41
|
|
|
36
42
|
## Connecting a Cloud Run source
|
|
37
43
|
|
|
@@ -56,6 +62,48 @@ Credentials are stored in `~/.canonry/config.yaml` (not the DB). The
|
|
|
56
62
|
canonical key lives only on the host that runs `canonry serve`. The
|
|
57
63
|
sync flow does NOT echo the private key back in any response.
|
|
58
64
|
|
|
65
|
+
## Connecting a WordPress source
|
|
66
|
+
|
|
67
|
+
The WordPress adapter pulls events from the **Canonry Traffic Logger**
|
|
68
|
+
WordPress plugin, which captures every non-admin GET page-load and
|
|
69
|
+
exposes a paginated REST endpoint protected by an Application Password.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# 1. Install the plugin. Download the latest release zip from the
|
|
73
|
+
# canonry-traffic-logger plugin's GitHub release (the repo CI workflow
|
|
74
|
+
# publishes a zip on every plugin-file change), then in wp-admin:
|
|
75
|
+
# Plugins → Add New → Upload Plugin → upload + activate.
|
|
76
|
+
|
|
77
|
+
# 2. In wp-admin, create an Application Password for the operator user:
|
|
78
|
+
# Users → Profile → Application Passwords. Copy the generated password.
|
|
79
|
+
|
|
80
|
+
# 3. (Optional) Adjust the retention window:
|
|
81
|
+
# Settings → Canonry Traffic Logger. The retention input clamps to
|
|
82
|
+
# 7–365 days; default is 90. The page also shows the current event
|
|
83
|
+
# count and the oldest event timestamp.
|
|
84
|
+
|
|
85
|
+
# 4. Connect from canonry CLI:
|
|
86
|
+
canonry traffic connect wordpress <project> \
|
|
87
|
+
--url https://example.com \
|
|
88
|
+
--username admin \
|
|
89
|
+
--app-password "xxxx xxxx xxxx xxxx xxxx xxxx"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
What the events table looks like (mirrors the TS
|
|
93
|
+
`WordpressTrafficEventPayload`):
|
|
94
|
+
|
|
95
|
+
| Column | Meaning |
|
|
96
|
+
|---|---|
|
|
97
|
+
| `observed_at` | ISO 8601 UTC timestamp with millisecond precision |
|
|
98
|
+
| `method`, `host`, `path`, `query_string` | Split `REQUEST_URI` parts |
|
|
99
|
+
| `status` | HTTP response status code |
|
|
100
|
+
| `user_agent`, `referer` | Headers as captured at request time |
|
|
101
|
+
| `remote_ip_hash` | First 12 hex chars of `sha256(ip + per-site-salt)` |
|
|
102
|
+
|
|
103
|
+
The plugin auto-prunes events older than the retention window (default
|
|
104
|
+
90 days) once per day via WP-Cron. Operators who want a different
|
|
105
|
+
window change it in `Settings → Canonry Traffic Logger`.
|
|
106
|
+
|
|
59
107
|
## Syncing data
|
|
60
108
|
|
|
61
109
|
```bash
|
|
@@ -160,8 +208,7 @@ domains, or PII are surfaced.
|
|
|
160
208
|
rDNS-verified hits. Unverified bots claim a known UA but couldn't be
|
|
161
209
|
cross-confirmed via reverse-DNS — they may be the real bot or an
|
|
162
210
|
imitator. Don't promote unverified counts in client-facing copy.
|
|
163
|
-
- **Cloud Run
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
registration.
|
|
211
|
+
- **Two adapters shipped (Cloud Run + WordPress); more planned.** The
|
|
212
|
+
doctor checks and the report renderer are adapter-agnostic — adding
|
|
213
|
+
a new adapter is just a new entry in `traffic_sources.source_type`
|
|
214
|
+
and a `TrafficSourceValidator` registration.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainyc/canonry",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.24.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent-first open-source AEO operating platform - track how answer engines cite your domain",
|
|
6
6
|
"license": "FSL-1.1-ALv2",
|
|
@@ -60,22 +60,22 @@
|
|
|
60
60
|
"tsup": "^8.5.1",
|
|
61
61
|
"tsx": "^4.19.0",
|
|
62
62
|
"@ainyc/canonry-api-routes": "0.0.0",
|
|
63
|
-
"@ainyc/canonry-contracts": "0.0.0",
|
|
64
|
-
"@ainyc/canonry-db": "0.0.0",
|
|
65
63
|
"@ainyc/canonry-config": "0.0.0",
|
|
64
|
+
"@ainyc/canonry-contracts": "0.0.0",
|
|
66
65
|
"@ainyc/canonry-intelligence": "0.0.0",
|
|
67
|
-
"@ainyc/canonry-
|
|
68
|
-
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
69
|
-
"@ainyc/canonry-integration-google": "0.0.0",
|
|
66
|
+
"@ainyc/canonry-db": "0.0.0",
|
|
70
67
|
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
68
|
+
"@ainyc/canonry-integration-google": "0.0.0",
|
|
69
|
+
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
70
|
+
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
71
|
+
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
71
72
|
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
72
73
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
73
|
-
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
74
74
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
75
|
-
"@ainyc/canonry-provider-local": "0.0.0",
|
|
76
|
-
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
77
75
|
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
78
|
-
"@ainyc/canonry-provider-
|
|
76
|
+
"@ainyc/canonry-provider-local": "0.0.0",
|
|
77
|
+
"@ainyc/canonry-provider-perplexity": "0.0.0",
|
|
78
|
+
"@ainyc/canonry-provider-openai": "0.0.0"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",
|