Skip to content

acoyfellow/self

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

self

Two tiny Cloudflare loop experiments behind one Worker:

  • do: a Durable Object alarm that calls back into the Worker through a loopback binding.
  • workflow: a Workflow that drains the same shape of KV queue with step.do() and step.sleep().

Tasks live in KV. Each tick claims one task and records a result.

TODO: see it get done. The POC stops at claim + log. Running Codex CLI needs an external runner.

Endpoints

  • POST /tasks?driver=do
  • POST /tasks?driver=workflow
  • POST /do/start
  • POST /do/stop
  • GET /status
  • POST /workflow/start
  • GET /workflow/:id

Quickstart

bun run dev

curl -X POST http://127.0.0.1:8787/tasks?driver=do \
  -H 'content-type: application/json' \
  -d '{"prompt":"Open todo.md. Pick the first unchecked item. Make the smallest valid patch."}'

curl -X POST http://127.0.0.1:8787/do/start \
  -H 'content-type: application/json' \
  -d '{"everyMs":5000}'

curl http://127.0.0.1:8787/status
curl -X POST http://127.0.0.1:8787/tasks?driver=workflow \
  -H 'content-type: application/json' \
  -d '{"prompt":"Read failing CI logs. Draft the smallest fix. Stop when tests pass."}'

curl -X POST http://127.0.0.1:8787/workflow/start \
  -H 'content-type: application/json' \
  -d '{"everyMs":5000,"maxTicks":4}'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors