whiff

module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: MIT

README

whiff

whiff runs puffs: small services that talk to each other, and to you, by sending messages. Agents can use them too, and what they write waits for your review.

; ~/.whiff/services/greet.puff
(service greet
  (on (hello name) "Greets name."
    (ok (string/concat "hello, " name))))
$ whiff call greet/hello ann
hello, ann

Services are written in puff, a small lisp with immutable values and Results instead of nil and exceptions. whiff supervises them, reloads them when you save, keeps their state across restarts, and keeps a history of every message.

Install

go install ./cmd/...
Binary What it is
whiff The daemon and its CLI: call, send, sub, inbox, history -f, … (whiff -h)
sniff The web UI: watch messages live, see services' state, review and answer
puff puff without a daemon: run a file, -e an expression, a REPL

Try puff on its own: go run ./cmd/puff examples/hello.puff ann.

Agents, safely

claude mcp add whiff -- whiff mcp

Each agent session gets an address (:agent/1) and every service function as a tool. Reads go straight through; writes wait for you:

whiff pending              # what waits for review
whiff accept 12            # or: whiff reject 12 "why"
whiff trust agent/1 todo   # let its writes to :todo through
whiff session agent/1      # everything the session wrote, and how

What's in it

  • Services keep state, subscribe to topics, run long jobs, and mark each function :read or :write. services/ has the ones in daily use: git, gh, todo, an assistant agent, and plan + pipeline, Claude building a goal task by task.
  • Views: a function can answer with items, a board or file locations. The CLI prints them for fzf (whiff call todo/view | fzf | whiff act); sniff shows them as pages with buttons.

Docs: use cases · procs · design · tasks · stdlib

Status

v0.6. whiff survives a restart: service state, inboxes, the review queue, timers, task results and 30 days of history are in ~/.whiff/whiff.db. Work has one id from submission to result, and every failure says its :outcome: not started, stopped, or unknown, when a job may still be running after a crash. Jobs retry with :retry n (a write only if :idempotent), errors offer the next step as actions, and procs runs dev servers and containers as jobs. puff gains use for shared code and faults that point at their cause.

v0.7 will focus on resident agents and bounded delegation: an agent that queues work, hands parts of it to others and comes back with a result after an interruption.

Inspirations

  • Erlang/OTP: addresses, mailboxes, plain-data messages, supervision.
  • Clojure: immutable values, [...] and {k v} literals, keywords, ->.
  • Rust: Result and Option, try and catch.
  • vrs: a lisp runtime for personal services, where whiff started.

License

MIT, see LICENSE.

Directories

Path Synopsis
cmd
puff command
Command puff runs puff code without a whiff daemon.
Command puff runs puff code without a whiff daemon.
sniff command
sniff is whiff's web UI: a page, served on 127.0.0.1, that shows what goes on between whiff's addresses as it happens, and each address's functions and state.
sniff is whiff's web UI: a page, served on 127.0.0.1, that shows what goes on between whiff's addresses as it happens, and each address's functions and state.
whiff command
Command whiff is the whiff daemon and its clients.
Command whiff is the whiff daemon and its clients.
examples
shop/api command
Command api is the shop's API, a demo for docs/procs.md: orders, kept in redis, on :8080.
Command api is the shop's API, a demo for docs/procs.md: orders, kept in redis, on :8080.
shop/web command
Command web is the shop's web UI, a demo for docs/procs.md: a page on :3000 that shows an order from the API, which it asks on :8080.
Command web is the shop's web UI, a demo for docs/procs.md: a page on :3000 that shows an order from the API, which it asks on :8080.
internal
daemon
Package daemon is whiff's daemon: it serves clients on the per-user socket and runs the services they talk to.
Package daemon is whiff's daemon: it serves clients on the per-user socket and runs the services they talk to.
puff
Package puff is a small lisp for whiff's services: immutable values, and Results and Options instead of nil and exceptions.
Package puff is a small lisp for whiff's services: immutable values, and Results and Options instead of nil and exceptions.
rpc
Package rpc is how whiff's clients talk to the daemon: JSON lines over a per-user unix socket.
Package rpc is how whiff's clients talk to the daemon: JSON lines over a per-user unix socket.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL