Keystore · Layer 3
Hank keeps durable, keyed records of what the platform needs to remember, such as settings, state, commands and schedules, and tells anyone listening the moment one changes.
Every key is its own record with a monotonic version and a last-modified time, so independent keys never overwrite each other.
Subscribe to a key or a glob pattern and get notified on change. No polling.
HANK/1 is a documented WebSocket protocol, with a read-only HTTP fallback. Any language can speak it.
Records are sealed with the platform's master key. SQLite is the default backend and it's pluggable.
Reserved kevin: prefixes mirror the device registry, telemetry and the command channel, so apps can read live fleet state.
Hank is mounted inside the Kevin daemon. One config flag turns it on, and when it's off nothing runs.
Hank speaks a small, versioned protocol over WebSocket. A client sets a key and gets back a version, and other clients hear about it.
client → {"op":"set","key":"kevin:cmd:restart-pump-17","value":{...}}
server → {"ack":true,"version":7,"updated_at":1712345678901}
client → {"op":"subscribe","pattern":"kevin:device:*"}
server → {"event":"set","key":"kevin:device:kv-pump-17","record":{...}}
Hank is layer 3 state that the other layers read through the daemon. The daemon uses it to mirror device state, telemetry and commands, and Marco reads it too.
Copyright (c) 1998-2026 spw1.com and steven p williams All Rights Reserved