feat: serve llms.txt so agents can discover the send API

Adds an llmstxt.org-format usage spec at the repo root, bundled into the
worker as a text module and served at GET /llms.txt. /llms.txt is the only
GET route; all other GETs still return 405, so crawlers and link previews
cannot trigger a Telegram message.
This commit is contained in:
tiennm99 committed 2026-08-03 10:23:35 +07:00
1 parent 4f0aa4b384
commit 3513f8abb9
3 files changed
+41 -1

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
# miti-telegram
> Cloudflare Worker that forwards a text message to Miti's Telegram inbox. Messages are sent with POST; there is no GET send endpoint.
Send a message:
```
POST https://miti-telegram.miti99.workers.dev/
Content-Type: application/json
{"text": "<your message>"}
```
`application/x-www-form-urlencoded` with `text=<your message>` is also accepted.
Responses: `{"success":true}` on success. `400` — missing `text`, or unsupported `Content-Type`. `405` — any method other than POST or OPTIONS; GET reaches only `/llms.txt` and cannot send. `500` — worker misconfiguration, not caller-fixable.
## Optional
- [Full rules for agents](https://github.com/tiennm99/miti-telegram#for-ai-agents--claude-code-routines): one POST per intended message, never probe the endpoint, never retry on 2xx.