You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(serve): webhook routes that fire cron jobs (HMAC, idempotency, filters) #582
Event-driven work (a PR gets a review, a monitor fires) should start a job immediately instead of polling, without opening an unauthenticated, injectable endpoint.
Proposed solution
POST /hooks/<route> on tole serve (no new server), per docs/automation-design.md §6, following Hermes' route model minus chat delivery:
Auth required: HMAC-SHA256 over <timestamp>.<body> with ±300 s window; GitHub X-Hub-Signature-256 compatibility; a route without a secret refuses to load; unauthenticated only on loopback.
Body cap before read, per-route rate limit, constant-time compare, idempotency by delivery id persisted as hook_seen (survives restarts).
events allowlist and declarative filters (equals/contains/in/regex/exists, all/any/not) run before any LLM work; non-matching → 200 ignored.
Action: fire an existing job (cron_job) with the rendered template as transient context; 202.
Payload is untrusted: narrow {dot.path} templates inside an untrusted-data fence; webhook runs are ReadOnly by default; wider tools only by manual config edit.
tole hook add|list|remove|test.
Later (not this issue): coalescing, script transforms.
Alternatives considered
A separate webhook server (more surface); delivering payloads straight into a session (no job/allowlist boundary).
Are you willing to contribute the implementation?
Yes, I can do it
Before submitting
I searched existing issues and didn't find a duplicate
Activity
feat(core): webhook signature verification core, HMAC-SHA256 with a r…
feat(serve): POST /hooks/<route> verified by signature, with idempote…
feat(serve): webhook filter and template engine, bounded regex and fe…
fix(hooks): pass the error closure by value (newer clippy: needless b…
feat(serve): webhook routes fire cron jobs through filters and a fenc…
feat(cli): tole hook add, list, remove and test (#648)
docs(release): bring the README, threat model and epics in line with …