- IN-01: delete the never-constructed ParsedInitData export (sole repo hit was its own declaration); the three read-helper catches now carry Intent: comments stating malformed-vs-tampered precedence and the chat-degrade law - IN-02: wrangler.jsonc line 2 states the post-fact truth — the chat_sessions namespace id below is live, no re-creation - IN-03: new T4 vector 'age 900 s → ok:true (the boundary is INCLUSIVE)' pins the strictly-greater comparator's inclusive edge (T-07-08); suite 126/126
38 lines
2.1 KiB
JSON
38 lines
2.1 KiB
JSON
{
|
||
// chat_sessions namespace created via `npx wrangler kv namespace create chat_sessions` — the id below is live.
|
||
"name": "araharah-bot",
|
||
"main": "src/webhook.ts",
|
||
"compatibility_date": "2026-10-22",
|
||
// workers_dev: serve on the <name>.<account>.workers.dev URL — the WEBHOOK_URL
|
||
// target for this phase (Phase 3's custom route/domain may supersede)
|
||
"workers_dev": true,
|
||
// Workers static assets binding (D-13, D-14): serves ../web/dist. The
|
||
// Worker fetch still owns /api/* and /telegram/* first via
|
||
// run_worker_first (a GLOB ARRAY, not a boolean).
|
||
"assets": {
|
||
"directory": "../web/dist",
|
||
"binding": "ASSETS",
|
||
"not_found_handling": "none"
|
||
},
|
||
"run_worker_first": ["/api/*", "/telegram/*"],
|
||
// Public vars (NOT secrets): the deployed Mini App ORIGIN used to build
|
||
// the /cari venue card's OPEN deep link (<MINI_APP_URL>/?dest=<id>).
|
||
// It must equal the Mini App URL registered in @BotFather (Bot API 10.2
|
||
// enforces the origin). Never derived from user input.
|
||
"vars": { "MINI_APP_URL": "https://araharah-bot.araharah-bot.workers.dev" },
|
||
// R2 binding (D-01, the repo's FIRST r2_buckets entry): hosts the road-graph
|
||
// binary /api/route loads (worker-router.ts memoizes ONE GET per cold
|
||
// isolate). A bucket is NOT a KV namespace — GE5 (exactly ONE
|
||
// kv_namespaces) still holds. Forks create + upload their OWN bucket:
|
||
// `npx wrangler r2 bucket create <name>` + routing/scripts/upload-road-graph.mjs
|
||
// (docs/ROAD-GRAPH.md is the fork contract). The bucket name is public
|
||
// configuration, never a secret.
|
||
"r2_buckets": [{ "binding": "ROAD_GRAPH", "bucket_name": "araharah-graphs" }],
|
||
// The repo's FIRST Cron Trigger (06-07, D-11): 60 s scan; card cadence
|
||
// decided in code (CARD_CADENCE_S 180) — D-11's 60–120 s window. The tick
|
||
// is STATELESS (zero KV writes — the free-plan budget law). Local test:
|
||
// curl "http://localhost:8787/cdn-cgi/local/scheduled" against `wrangler dev`.
|
||
"triggers": { "crons": ["*/1 * * * *"] },
|
||
"kv_namespaces": [{ "binding": "chat_sessions", "id": "59f58a54bc44483e89872b20a005a5eb" }]
|
||
}
|