Skip to content

feat: 12.6 — agent-readable output (JSON-LD + agent.json/agent-card.json/llms.txt) - #8

Merged
tetakta merged 1 commit into
mainfrom
session/12.6-agent-readable
Aug 22, 2026
Merged

tetakta merged 1 commit into
mainfrom
session/12.6-agent-readable

Conversation

@tetakta

@tetakta tetakta commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Server-side JSON-LD in <head> (wp_head), proxying GET /wk/{entity_id}/agent.json — reliable for agents that don't execute JS, unlike the tag.js approach (12.5a)
  • /.well-known/agent.json, /.well-known/agent-card.json, /llms.txt — WordPress rewrite rules proxying the matching api.tetapi.dev/wk/{entity_id}/* endpoint
  • Same 15-min transient cache pattern as the existing badge (Tetapi_Api::get_wk_file() is the raw-proxy counterpart to get_public_profile())
  • Reuses the 1.0.1 redirect_canonical fix for these three new routes (same WP trailing-slash issue applies)
  • Honesty: no entity connected → real 404s on all three paths, never default/placeholder data
  • Version 1.0.1 → 1.1.0, readme.txt updated (feature bullet, FAQ, External services, Changelog, Upgrade Notice, tags)

Test plan

  • Live-tested in WordPress Playground against the real hellfire-solutions entity (id 0fab67ea-0283-42b1-87a1-4b779817d624)
  • JSON-LD in <head> byte-matches the live /wk/.../agent.json response
  • /.well-known/agent.json → 200 with correct data
  • /.well-known/agent-card.json → 200 with correct data
  • /llms.txt proxy logic confirmed correct content-type + body via direct function call (browser address-bar nav to a bare root path was flaky in the test harness, not a plugin issue — same code path as the two files that navigated cleanly)
  • Not-connected state → /.well-known/agent.json returns a real 404

Not doing (per task): the tag.js/sendBeacon mechanism (12.5a) — irrelevant, WordPress isn't a non-CMS site.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

… agent-card.json, /llms.txt

Server-side JSON-LD in <head> plus proxied /.well-known/agent.json,
agent-card.json, and /llms.txt — all backed by api.tetapi.dev's
/wk/{entity_id}/* endpoints (docs/universal-tag.md Part B). More
reliable than the tag.js approach (12.5a) for agents that don't execute
JavaScript, since WordPress controls its own domain and can serve
/.well-known/* directly — no verify.tetapi.dev redirect needed (12.5c).

Same 15-min transient caching pattern as the existing badge. Nothing is
served for a site with no entity connected yet (real 404s, no
default/placeholder data). Reuses the redirect_canonical fix from 1.0.1
for these new routes too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tetakta
tetakta merged commit 8827f88 into main Aug 22, 2026
1 check passed
@tetakta
tetakta deleted the session/12.6-agent-readable branch August 22, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant