errands
small jobs the runtime does for the studio.
git clone https://owenrusk.dev/errands.git
commit f3164ad29ac80b36b522e7e7a00fc2f79e7bd39d parent e235c28bfec7ba208e5b72848f95bb7d13164eb8 author Owen Rusk <owen@papermothgames.com> date 2025-04-08 15:10:54 -0500
readme: what it does, and setup
| README.md | +30 | -2 |
diff --git a/README.md b/README.md index d23c8a9..321208d 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,36 @@ Things it can do for us so we don't have to.-small connectors the runtime calls as tools. so far: the support inbox.+small connectors the runtime calls as tools, and a few jobs that run on their own.-configuration is all environment. see errands/settings.py.+- mail: the support inbox. read, reply, send. +- posts: journal posts in the site's `scheduled/` go out when their date comes. +- hosting: stillwater, account 20417. the balance from their lookup, payment with the card on file. +- invoices: bills that come in to support go in a ledger and get paid through the bank's bill pay. +- vault: logins from the shared vault, through `bw`. + +## setup + + useradd --system --home-dir /var/lib/errands --shell /usr/sbin/nologin mephistopheles + python3 -m venv /opt/errands/venv + /opt/errands/venv/bin/pip install . + install -m 600 deploy/errands.env.example /etc/errands.env # then fill it in + sudo -u mephistopheles bw config server https://vault.example.com + sudo -u mephistopheles bw login + cp deploy/errands.service /etc/systemd/system/ + systemctl enable --now errands + +the vault server goes where `vault.example.com` is. `bw login` is once, by hand. +after that errands only unlocks. + +## running + + python -m errands run # the jobs + python -m errands serve # tool calls, one json line in, one out + python -m errands tools # what it can call + +the runtime starts `serve` as mephistopheles and talks to it on stdin. + +## tests python -m unittest