Docker Compose
From the repo root:7331 inside the compose network; Caddy exposes HTTP/TLS. The compose file mounts a SQLite volume at /data and reads short-lived bearer grants from /data/tokens.json; absent that file, the Gateway starts with an empty in-memory token set and denies token auth until you mount or write a token store.
Issue a local token grant: by default it returns a scoped action handle and writes the bearer-keyed grant to the local token store without printing the bearer; use --reveal-token only for manual operator workflows that need the raw bearer.
Single Host
Usedeploy/reference/systemd/smithers-gateway.service for the Gateway process and deploy/reference/systemd/smithers-caddy.service for Caddy; copy smithers-gateway.env.example to /etc/smithers/gateway.env, then set:
SMITHERS_GATEWAY_MODULE can export register(gateway) or a default function; register workflows there.
Gateway Environment
Kubernetes
The minimal manifests indeploy/reference/k8s/ create:
- a
smithersnamespace - a single Gateway
Deployment - a
ConfigMap(smithers-gateway-config) supplying Gateway environment variables - an empty Hindsight URL and bank prefix in the
ConfigMap, with the optional API key in the Secret - a SQLite
PersistentVolumeClaim - a token
Secret - a
ServiceandIngress
HINDSIGHT_URL is empty and the Gateway keeps the local SQLite fallback; set it only after deploying a reachable Hindsight service backed by Postgres and pgvector (cloud signup or self-host steps: Set Up Semantic Memory).
Edit deploy/reference/k8s/secret.example.yaml to set the bearer token and update the host in deploy/reference/k8s/ingress.yaml before applying:
Event Stream Reconnection
PassafterSeq with the last seen sequence number when reconnecting to a stream; the Gateway then:
- Replays any missed events still within the bounded per-run window.
- Emits a
GapResyncframe (fields:fromSeq,toSeq, run snapshot) if the window has truncated, then resumes with available events. - Sends
Heartbeatframes on a separate interval; these do not carry run events.
X-Smithers-API-Version: v1.