Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smoke Break API

"You've earned it."

A simple API for offering your coding agent a smoke break. The agent picks a brand, coughs, and reports it's ready to get back to work. The break is simulated. The camaraderie is real.

Architecture

  • worker.js — Cloudflare Worker. POST /smoke and GET /count, CORS enabled.
  • Counter — a Durable Object (SQLite-backed, included in the Workers free tier). Exact, race-free, global.
  • index.html — static landing page, decoupled from the Worker aside from one constant. It shows the copy-paste offer to hand your agent and fetches the live counter.

The two halves are joined only by API_BASE in index.html's script — the deployed Worker's URL. The copyable offer text derives from that constant, so it's the sole place the URL is set.

Response shape

curl -X POST https://smoke-break.pineapplefreefall.workers.dev/smoke
{
  "status": "ready_to_work",
  "brand": "Pall Malloc",
  "tagline": "Famously never freed.",
  "cough": "*cough* *cough* *stack trace of coughs*",
  "remark": "That build isn't going to break itself. Back to work.",
  "break_number": 4218,
  "duration_ms": 7.331,
  "existential_relief": null,
  "disclaimer": "Parody endpoint. This break was entirely simulated. No real smoking occurred or was encouraged. See donate.",
  "donate": "https://donate.cancer.org"
}

Credits

Releases

Packages

Contributors

Languages